This page doesn't exist. (ActionController::RoutingError)

Changes such as the status of a ticket are not stored in the ticket histoy.
Articles of type e-mail can be created by the agent but the creation of the article is not stored in the ticket history and the email is not sent.
Notifications for new tickets are not sent by email.

We have no idea what is causing this problem. Any help would be greatly appreciated.

Infos:

  • Used Zammad version: 6.4.1
  • Used Zammad installation type: package
  • DB: PostgreSQL 13
  • Operating system: Debian 11
  • Browser + version: Chrome 131 on MacOS 15.1

System Specs

IONOS Cloud Server
CPU: 4
Memory: 8G
Storage: 80G

Health Check

{
  "healthy": true,
  "message": "success",
  "issues": [],
  "actions": []
}

Production.log

The only errors visible in the log:

E, [2025-01-22T00:01:46.103907#41585-186680] ERROR -- : This page doesn't exist. (ActionController::RoutingError)

E, [2025-01-22T00:01:46.586326#41585-186260] ERROR -- : This page doesn't exist. (ActionController::RoutingError)

E, [2025-01-22T00:15:05.103417#41585-186260] ERROR -- : This page doesn't exist. (ActionController::RoutingError)

E, [2025-01-22T00:33:25.077331#41585-186260] ERROR -- : This page doesn't exist. (ActionController::RoutingError)

E, [2025-01-22T00:33:25.504110#41585-191620] ERROR -- : This page doesn't exist. (ActionController::RoutingError)

E, [2025-01-22T00:33:25.890562#41585-191740] ERROR -- : This page doesn't exist. (ActionController::RoutingError)

We have tried:

  • Zammad restart
  • Server restart
  • Run post install script
  • zammad run rake db:migrate
  • zammad run rake zammad:package:migrate
  • zammad run rake assets:precompile
  • Checked for disabled schedulers. zammad run rails r "p Scheduler.where(active: false).pluck(:name)"
    Output: []
  • Checked the overview count. zammad run rails r "p Overview.count"
    Output: 49
  • Checked for delayed jobs. zammad run rails r "p Delayed::Job.count"
    Output: 0
  • Checked web concurrency zammad config:get WEB_CONCURRENCY
    Output: not set
  • Checked job concurrency zammad config:get ZAMMAD_SESSION_JOBS_CONCURRENT
    Output: not set
  • Checked scheduled job workers zammad config:get ZAMMAD_PROCESS_SCHEDULED_JOBS_WORKERS
    Output: not set
  • Checked delayed job workers zammad config:get ZAMMAD_PROCESS_DELAYED_JOBS_WORKERS
    Output: not set
  • Checked Jobs Scheduler zammad run rails r "pp Scheduler.find_by(method: 'Sessions.jobs')"
#<Scheduler:0x00007fbd8df1eb20
 id: 7,
 name: "Generate 'Session' data.",
 method: "Sessions.jobs",
 period: 60,
 running: 0,
 last_run: Tue, 21 Jan 2025 22:21:34.559000000 UTC +00:00,
 prio: 1,
 pid: "186460",
 note: nil,
 error_message: "",
 status: "ok",
 active: true,
 updated_by_id: 1,
 created_by_id: 1,
 created_at: Mon, 15 Mar 2021 21:51:34.693000000 UTC +00:00,
 updated_at: Tue, 21 Jan 2025 22:21:34.571000000 UTC +00:00,
 timeplan: {}>

NGINX config

upstream zammad-railsserver {
  server 127.0.0.1:3000;
}

upstream zammad-websocket {
  server 127.0.0.1:6042;
}

server {
  listen 80;
  listen [::]:80;

  server_name support.*********.de;

  # security - prevent information disclosure about server version
  server_tokens off;

  access_log /var/log/nginx/zammad.access.log;
  error_log /var/log/nginx/zammad.error.log;

  location /.well-known/ {
    root /var/www/html;
  }

  return 301 https://$server_name$request_uri;
}


server {
  listen 443 ssl http2;
  listen [::]:443 ssl http2;

  server_name support.*********.de;

  server_tokens off;

  ssl_certificate /etc/letsencrypt/live/support..*********.de/fullchain.pem;                                                                                  
  ssl_certificate_key /etc/letsencrypt/live/support..*********.de/privkey.pem;
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

  ssl_protocols TLSv1.2 TLSv1.3;
  ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
  ssl_prefer_server_ciphers off;
  ssl_session_cache shared:SSL:10m;
  ssl_session_timeout 180m;
  ssl_session_tickets off;
  ssl_stapling on;
  ssl_stapling_verify on;

  # Use your prefered resolver - also allows external like 1.1.1.1 and 8.8.8.8
  # resolver 127.0.0.1;

  add_header Strict-Transport-Security "max-age=63072000" always;

  location = /robots.txt  {
    access_log off; log_not_found off;
  }

  location = /favicon.ico {
    access_log off; log_not_found off;
  }

  root /opt/zammad/public;

  access_log /var/log/nginx/zammad.access.log;
  error_log  /var/log/nginx/zammad.error.log;

  client_max_body_size 50M;

  location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico|apple-touch-icon.png) {
    expires max;
  }

  # legacy web socket server
  location /ws {
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $http_host;
    proxy_set_header CLIENT_IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_read_timeout 86400;
    proxy_pass http://zammad-websocket;
  }

  # action cable
  location /cable {
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $http_host;
    proxy_set_header CLIENT_IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_read_timeout 86400;
    proxy_pass http://zammad-railsserver;
  }

  location / {
    proxy_set_header Host $http_host;
    proxy_set_header CLIENT_IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto	$scheme;

    # change this line in an SSO setup
    proxy_set_header X-Forwarded-User "";

    proxy_read_timeout 180;
    proxy_pass http://zammad-railsserver;

    gzip on;
    gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
    gzip_proxied any;
  }
}

I have no clue what could cause this to be honest.
It’s strange that neither mails are send, nor the history is being written in combination that there’s zero log file entries.

Might be database related. Whatever it is, at least error handling seems to be troublesome if Zammad fails to insert data at some point and “silently” dies in the process of doing so.

1 Like

I would track the access.log of nginx and the production log at the same time to see what is happening.

do you have ad blockers or something on your browser.
Is it sporadic or always.

the timestrample of Error matches the Strange Time ? because this Error usually comes when Someone is probably calling a URL that does not exist. Must be visible in the Production.log line above or below. you can also find this in Access.log too.

2 Likes

You‘re correct. Meanwhile we have fixed the issue. I will provide additional details later.

So we were able to fix the problem. The corresponding error message was this.

E, [2025-01-24T11:10:34.907018#14696-186260] ERROR -- : Validation failed: Name has already been taken (ActiveRecord::RecordInvalid)
app/jobs/plenty_get_customers_job.rb:146:in `block in create_or_update_User'
app/jobs/plenty_get_customers_job.rb:129:in `each'
app/jobs/plenty_get_customers_job.rb:129:in `create_or_update_User'
app/jobs/plenty_get_customers_job.rb:102:in `getCustomers'
app/jobs/plenty_get_customers_job.rb:108:in `getCustomers'
app/jobs/plenty_get_customers_job.rb:68:in `perform'
app/controllers/integration/plenty_controller.rb:187:in `getCustomers'
app/controllers/application_controller/handles_transitions.rb:16:in `handle_transaction'
I, [2025-01-24T11:10:34.909095#14696-186260]  INFO -- : Completed 422 Unprocessable Entity in 53308ms (Views: 0.2ms | ActiveRecord: 28500.4ms | Allocations: 5090391)

plenty_controller is an AddOn which provides an integration with plentymarkets.
Contacts including organisation are synced one-way from plentymarkets to Zammad.

An Amazon order was imported into plentymarkets with contact details and the company name XYZ GmbH. 2 years later, the same customer buys something on Amazon from the same merchant and enters his contact details again. But this time the company name is written Xyz Gmbh.
plentymarkets updates the company name: XYZ GmbH → Xyz Gmbh

The contact is synced to Zammad and the AddOn searches for the organisation Xyz Gmbh. Zammad doesn’t find this organisation because only XYZ GmbH exists but not Xyz Gmbh. Next step would be to create this organisation. This is where the error occurs.

This is the code part:

def create_or_update_User(method, page, users)
            counter = 0
            log = {}
            users.each do |child|
                if child['email'].downcase.present?
                    email_address_validation = EmailAddressValidation.new(child['email'].downcase)
                    if email_address_validation.valid?
                        counter = counter+1
                        user = User.lookup(email: child['email'].downcase)

                        if child['accounts'][0]                          

                            companyName = "#{child['accounts'][0]['companyName'].truncate(80)} - #{child['accounts'][0]['id']}"                  

                            organization = Organization.find_by(name: companyName)

                            if !organization
                                if @config['general']['debugmode'] == true
                                    Rails.logger.info "Plenty_Log_DEBUG: create_or_update_User: create organization #{child['accounts'][0]['id']}"
                                end 
                                organization = Organization.create!(
                                    plenty_accountid:     child['accounts'][0]['id'],
                                    name:     companyName,
                                    shared: true,
                                    domain_assignment: false,
                                    created_by_id: 1,
                                    updated_by_id: 1,
                                    active:    true,
                                )

                            else
                                if @config['general']['debugmode'] == true
                                    Rails.logger.info "Plenty_Log_DEBUG: create_or_update_User: Organization existiert bereits #{child['accounts'][0]['id']}"
                                end
                                organization.plenty_accountid = child['accounts'][0]['id']
                                organization.name = companyName
                                organization.active = true
                                organization.save
                            end

                            organization = Organization.find_by(plenty_accountid: child['accounts'][0]['id'])

                        else 

                            organization = nil

                        end

The error itself isn’t a big deal and we’ll find a solution to ignore upper/lower case, since Organization.find_by(name: companyName) won’t find Xyz if only XYZ exists. I am not sure why Organization.find_by and Organization.create work so differently.

The big problem is that Zammad stopped working almost completely after the error occurred. Channels were still fetched but that was it.
No ticket history was created for changes or updates to a ticket.
No internal notifications (online and email) were sent out to agents.
No emails were sent to customers, when articles/replies were created.

So why is Zammad no longer creating a ticket history anymore and also not throwing errors in the production.log? No backlog in the scheduler either.

I will try to reproduce the error in the next few days and update here.

Cheers,
Gijs