Zammad 6.0 Rails Action /cable on Apache shows "Connection to the server was lost" (Solved...?)

Infos:

  • Used Zammad version: 6.0.0-1686341484.c00b581a.focal
  • Used Zammad installation type: Package
  • Operating system: Ubuntu 20.04.6 LTS (Focal Fossa)
  • Webserver: Apache 2.4.41-4ubuntu3.14
  • Browser + version: Tested on various recent browsers (Mozilla Firefox, Google Chrome, Chromium) on desktop as well as mobile

It seems there already are a couple of topics with either NginX or Apache setups with issues regarding the new Rails Action cable and the ProxyPass directives, even while keeping in mind al the necessary steps to upgrade an installation. The following was diagnosed on a server hosting Zammad on Apache:

The upgrade from 5.4.1 to 6.0 seemed to have gone without issues. No errors during the upgrade and the desktop version seemed to work fine. We added the new /cable ProxyPass directive from the release notes to our Apache config (and restarted Apache). Going to the mobile version of the Zammad instance produced the following red error message in the top right:

image

Firefox Developer Tools shows the following while debugging the requests:

image

In the Apache access logs, the following HTTP 404 error is logged regarding the request:

helpdesk.XXXXXXXX.nl:443 2a02:aaaa:bbbb:c:dddd:eeee:aaaa:bbbb - - [12/Jun/2023:18:07:14.243 +0200] "GET /cable HTTP/1.1" 404 7575 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0" **6**

We changed the ProxyPass directive, which seems to have resolved this issue. So if you are experiencing the errors as mentioned above, try adding the following to your Apache virtualhost config instead of the ProxyPass directive in the release notes (and restart the webserver):

<Location /cable>
        ProxyPass ws://127.0.0.1:3000/cable
        ProxyPassReverse ws://127.0.0.1:3000/cable
</Location>

The red connection error is gone and the request shows HTTP 101 Switching Protocols instead of HTTP 404 Not Found, and the application seems to be performing as it should.

image

I’m very certain that this location directive is not required if you consider the proxypass order like in the contrib file:

Ordering is very crucial in that scope.

1 Like

That’s it! It is the ordering! I’ve tested with your snippet and it works! We had an existing config and just put the /cable stanza from the release notes at the end of it, below the other ProxyPass directives, not realizing the ordering is crucial here. Thanks!

2 Likes

No worries. The release notes are not exactly specific about that regard. I failed at that point too often :smiley:

2 Likes

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