Zammad wants to use nonexistent /cable folder in mobile view

Hello!

  • Used Zammad version: 6.0.0-1686215060.f57bd7c6.bionic
  • Used Zammad installation type: (source, package, docker-compose, …) : Package
  • Operating system: Ubuntu 18.04
  • Browser + version: Chrome Version 114.0.5735.199

From inside the nginx.zammad.error.log:
‘’‘open() “/opt/zammad/public/cable” failed (2: No such file or directory) , server: _, request: “GET /cable HTTP/1.1”,’‘’

So it seems to want to acess a cable folder . There is no Folder.

"

action cable

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

"

This part is in the zammad.conf file.
Which is located in /etc/nginx/sites-available

Expected behavior:

It opens the mobile site and isn’t losing the connection.

Actual behavior:

It opens the mobile site and is losing the connection.

The normal Zammad Website is working.

Thhak you for your Help!

Hi @BratonPrime.

Please make sure that http_type and fqdn are set correctly and that you’re using the FQDN to access the mobile view. Otherwise the data out of your production.log might be interesting as well (all entries that are related to /cable).

Hello @fliebe92.

Thank you very much for your help!

The fqdn is set correctly in the Rails console.

I tried changing the http_type there from https to http. After restarting Zammad it gave the same errors, so I changed it back to https.

This is how it looks in the production.log file:

I, [2023-07-04T11:32:33.299514#208428-115000] INFO – : Started GET “/cable” for 192.168.106.254 at 2023-07-04 11:32:33 +0000
I, [2023-07-04T11:32:33.305997#208428-115000] INFO – : Started GET “/cable/” [WebSocket] for 192.168.106.170 at 2023-07-04 11:32:33 +0000
E, [2023-07-04T11:32:33.306115#208428-115000] ERROR – : Request origin not allowed: https://MyFQDN
E, [2023-07-04T11:32:33.306155#208428-115000] ERROR – : Failed to upgrade to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: WebSocket)
I, [2023-07-04T11:32:33.306195#208428-115000] INFO – : Finished “/cable/” [WebSocket] for 192.168.106.170 at 2023-07-04 11:32:33 +0000
I, [2023-07-04T11:32:40.383206#208428-111940] INFO – : Started GET “/cable” for 192.168.106.254 at 2023-07-04 11:32:40 +0000
I, [2023-07-04T11:32:40.390057#208428-111940] INFO – : Started GET “/cable/” [WebSocket] for 192.168.106.170 at 2023-07-04 11:32:40 +0000
E, [2023-07-04T11:32:40.390144#208428-111940] ERROR – : Request origin not allowed: https://MyFQDN
E, [2023-07-04T11:32:40.390183#208428-111940] ERROR – : Failed to upgrade to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: WebSocket)
I, [2023-07-04T11:32:40.390223#208428-111940] INFO – : Finished “/cable/” [WebSocket] for 192.168.106.170 at 2023-07-04 11:32:40 +0000
I, [2023-07-04T11:32:41.656425#208433-111980] INFO – : ProcessScheduledJobs running…
I, [2023-07-04T11:32:41.659018#208433-111980] INFO – : Running job thread for ‘Generate ‘Session’ data.’ (Sessions.jobs) status is: sleep
I, [2023-07-04T11:32:41.659091#208433-111980] INFO – : Running job thread for ‘Check channels.’ (Channel.fetch) status is: sleep
I, [2023-07-04T11:32:41.659139#208433-111980] INFO – : Running job thread for ‘Check ‘Channel’ streams.’ (Channel.stream) status is: sleep
I, [2023-07-04T11:32:41.660127#208433-111980] INFO – : Running job thread for ‘Execute planned jobs.’ (Job.run) status is: sleep
I, [2023-07-04T11:32:48.290276#208428-112420] INFO – : Started GET “/cable” for 192.168.106.254 at 2023-07-04 11:32:48 +0000
I, [2023-07-04T11:32:48.296570#208428-112420] INFO – : Started GET “/cable/” [WebSocket] for 192.168.106.170 at 2023-07-04 11:32:48 +0000
E, [2023-07-04T11:32:48.296649#208428-112420] ERROR – : Request origin not allowed: https://MyFQDN
E, [2023-07-04T11:32:48.296687#208428-112420] ERROR – : Failed to upgrade to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: WebSocket)
I, [2023-07-04T11:32:48.296726#208428-112420] INFO – : Finished “/cable/” [WebSocket] for 192.168.106.170 at 2023-07-04 11:32:48 +0000

I hope that these logs are usefull. Thanks for the help so far.

Just to confirm: Even after restarting your Zammad instance, you’re faced with the same error, right?

Yes, I have restarted it completely.

Can you please execute rails r "pp Rails.application.config.action_cable.allowed_request_origins" (in a package install, please prefix it with zammad run) and check if your FQDN is included there?

Hi,

I get [“http://localhost:3000”, “https://MyFQDN”] as the response. It is correct if it is case-insensitive.

How can i change the http FQDN ?

It’s case-sensitive. Make sure to set the correct fqdn in your system.

There is no http FQDN, this part of the output from the command I gave to you is hardcoded.

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.