I stumbled over the same issue with the “The connection to the server was lost.” error as mentioned here: Zammad 6.0 Mobile client issues
It’s already mentioned on the release announcement New Major Release: Zammad 6.0! that you need to update the nginx config for /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_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 86400;
proxy_pass http://zammad-railsserver;
}
however, I was inclined to just copy the existing configuration for my reverse proxy which sent the /cable traffic to the nginx in that is started with the docker-compose but the important part of the nginx configuration mentioned above is
proxy_pass http://zammad-railsserver;
which means that /cable has to go to the rails container and NOT the nginx that is started from the docker-compose.
To accomplish this, edit the docker-compose.override.yml
and add to it:
services:
zammad-railsserver:
ports:
- "10082:3000"
choose whatever port works for you.
on the reverse proxy then make the configuration look like this:
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_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 86400;
proxy_pass http://10.10.20.25:10082;
}
update the IP + Port from proxy_pass to match your environment.
Now all /cable requests are passed into the rails container and this fixes the issue.