502 Bad Gateway after upgrade from 4.0.0 to 4.1.0


since Zammad has updated from 4.0.0-1623071600 to 4.1.0-1623131647 automatically this morning we get a “502 Bad Gateway” error. We tried a lot of things to solve it with no positive results unfortunately. This afternoon we checked for an update through ‘apt-get update’ and all of a sudden there was a version 4.1.0-1623243527. In the hope it would resolve the issue we upgraded to this version but no luck.

We have absolutely no clue how to solve it. Does anyone have a few clear steps that we can follow to resolve this issue?




  • Used Zammad version: 4.1.0-1623243527
  • Used Zammad installation type: automatic upgrade
  • Operating system: 18.04.5 LTS (Bionic Beaver)
  • Browser + version: All Browsers

Expected behavior:

  • Normal operation

Actual behavior:

  • nginx displaying error message “502 Bad Gateway”

Steps to reproduce the behavior:

  • access Zammad

Never ever automatically update Zammad unattended.
Lesson 1.

It’s impossible to help you at this state, but if I’d had to guess:
Zammad does not lsiten to network due to left over directories / files that are an issue.

running zammad run rails c should also fail.
If so, check with the tracebacks in the following issue if they are the same and if so check my comment on how to fix it.

Again my suggestion: Never update Zammad and it’s dependencies unattended. Always have a look at it to be able to see these kinds of issues.

Thanks for you fast response… We will stop the automatic upgrade procedure (a wise lesson indeed) :flushed:. Running “zammad run rails c” indeed displays an error. The last line reads:

“/opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `block in load_missing_constant’: uninitialized constant ActiveRecord::Observer (NameError)”.

Does this give a clue? Or should we make a backup, reinstall and restore?



If you check the issue I mentioned above and have a look on my first response then you’ll find a dirty quick fix for that issue. :wink:

:grinning_face_with_smiling_eyes: Ok, I used the procedure and the first time there was no error but still got the gateway message (after restarting zammad) so I repeated the procedure and get this message:

dpkg: warning: ignoring request to remove zammad, only the config files of which are on the system; use --purge to remove them too

Should I use the purge option?

zammad.service is running by the way:

● zammad.service
Loaded: loaded (/etc/systemd/system/zammad.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-06-09 18:15:28 CEST; 8min ago
Main PID: 39808 (sleep)
Tasks: 1 (limit: 9830)
CGroup: /system.slice/zammad.service
└─39808 /bin/sleep infinity

Jun 09 18:15:28 contact systemd[1]: Started zammad.service.

Please follow the commands exactly (meaning stop the service before) and do not purge.
Only remove the package to not remove productive data.

After installing the package back in place you should be good to go.


we did following the instructions exactly but it did not help. Eventually things were getting very odd, resulting in disappearing folders/files (for example the backup script vanished) and Linux telling us that the Zammad Service was not existing. So, offcourse I had made a backup (as instructed :wink:). So because we had the backup I installed Zammad with APT-GET and it worked! To make sure that we had consistent data, I restored the backup and since then everything is running smooth.

So we learned a lot of things and we would like to thank you very much for guiding us with you wisdom and advice. I can’t tell you how much we appreciate it! :+1:t2:



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