Zammad website not reachable after database restore


  • Used Zammad version: 4.0.0
  • Used Zammad installation type: source
  • Operating system: Ubuntu 20.04
  • Browser + version: Firefox 111

Expected behavior:

  • After successful file and db restore from same version Zammad webpage should be accessible.

Actual behavior:

  • Zammad webpage is not accessible. Error is: 502 Bad Gateway ---- nginx/1.18.0 (Ubuntu)

Steps to reproduce the behavior:

  • Set up virtual machine with same ubuntu and zammad version.
  • Import backup file (created by Zammad backup script) to VM.
  • Restore everything with Zammad restore script with the help of Zammad Migrating Guide.

Used guides:

The zammad.service and zammad-websocket.service are running, so does elasticsearch.service and nginx.service.

Following command does not show any syntax errors: nginx -t
When issuing nginx -T it is loading the zammad.conf for nginx just fine.

I see no services zammad-web.service and zammad-worker.service. They were not added when installing zammad 4.0.0.

May I ask for assistance with resolving this issue? This is mandatory before upgrading zammad to a new version, as this fails on the productive VM.


Edit: By copying the /opt/zammad/vendor/pkgr/scaling/systemd/zammad-web.service file to /etc/systemd/system and enabling it the service is now running.
But still, Zammad webpage is noch reachable. Still error 502 Bad Gateway.

Of course not. That doesn’t happen automatically on a source code installation.
The restoration process expects an existing installation on the new host. In your case as per:

However you could also go by package which technically is a lot easier:

Your Zammad version is terribly outdated and a security hazard to yourself and affected users. You should update asap.

Your production log should hold this information.
If I’d had to guess it’s either missing database migrations, entire database f*cked up or incorrectly followed restoration guide and in the end non fitting Zammad files.

Thank you so much for your answer.

I will try this the next time when updating Zammad.

Yes, I know. That’s why this upgrade is pretty important, beside the many new features. We are trying to update Zammad for about a year now but this always failed and we didn’t have time to fully troubleshoot this issues. So now I am doing this again.

The new installation doesn’t even have the log folger generated, although the bare installation of zammad was successful. So it might be the database and file import which “fucked up” the installation.
I also see that the server is not listening on ports 3000 (for rails) and 6042 (for zammad websocket), so this might be the cause for seeing 502 Bad Gateway.

Again, thank you!

I think I will go ahead and start all over again.

That doesn’t sound too good to be honest.

Without wanting you to force into directions:

  • You could migrate to Zammad’s SaaS variant (with data migration). This would spare you from future update hassles (because we do it for you) and also gives support for your instance on top.
  • We do offer trouble shooting workshops beside our support contracts if that is of any help to you

I just try to give you all available options to you here (beside your manual fiddlings without knowing what the actual upgrade issue is) hoping it helps you on that journey.

1 Like

Thank you for the suggestion. I will give these information to our Head of IT Systems, as I am not the one making decisions on how to spend money. But this might save a lot of time and headaches.

I’ve told you yesterday that our upgrade to Zammad 5.4.1 was successful. Today I’ve noticed that the ticket pages are blank and I can’t create any tickets as the fields priority, customer etc. are not shown and I can’t enter a text. Also Zammad is not writing into the log files anymore.

So I’ve rolled back to a snapshot from version 5.0.0 which I created earlier yesterday evening. On 5.0 everything is working fine again so my next steps will be to troubleshoot the update to the latest version.

I am also unable to update via package, because Ubuntu 20.04 gives an error that the public key for the repository of Zammad is missing. So it won’t download zammad.

Best regards

The repo steps of the install as package in the documentation should be able to help you with that

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