Zammad service does not restart properly

Infos:

  • Used Zammad version: 6.5.2-1760945831.23b4cf50.noble
  • Used Zammad installation type: package
  • Operating system: Ubuntu 24.04
  • Browser + version: any

Expected behavior:

  • zammad

Actual behavior:

  • no zammad - 502 Bad Gateway

Steps to reproduce the behavior:

This is a fresh install of zammad on a fresh vm.

When I do a systemctl restart zammad it seems to shut down cleanly but doesn’t do anything after restarting. /var/log/zammad/production.log shows no activity after the clean shutdown, and ss -tuln | grep "3000\|6042" shows it is no longer listening on either of those ports. rebooting the server fixes the issue.

I seem to have extra zammad services with an appended “-1” at the end. Is that normal?

systemctl | grep zammad :

● zammad-web-1.service                       loaded failed failed    zammad-web-1.service
  zammad-web.service                         loaded active running   zammad-web.service
● zammad-websocket-1.service                 loaded failed failed    zammad-websocket-1.service
  zammad-websocket.service                   loaded active running   zammad-websocket.service
● zammad-worker-1.service                    loaded failed failed    zammad-worker-1.service
  zammad-worker.service                      loaded active running   zammad-worker.service
  zammad.service                             loaded active running   zammad.service

journalctl --grep="zammad" --since "2 minutes ago"

Oct 27 08:53:01 zammad systemd[1]: Stopping zammad-web.service...
Oct 27 08:53:01 zammad systemd[1]: Stopping zammad-websocket.service...
Oct 27 08:53:01 zammad systemd[1]: Stopping zammad-worker.service...
Oct 27 08:53:01 zammad systemd[1]: zammad-web.service: Deactivated successfully.
Oct 27 08:53:01 zammad systemd[1]: Stopped zammad-web.service.
Oct 27 08:53:01 zammad systemd[1]: zammad-websocket.service: Deactivated successfully.
Oct 27 08:53:01 zammad systemd[1]: Stopped zammad-websocket.service.
Oct 27 08:53:01 zammad systemd[1]: zammad-worker.service: Deactivated successfully.
Oct 27 08:53:01 zammad systemd[1]: Stopped zammad-worker.service.
Oct 27 08:53:01 zammad systemd[1]: Stopping zammad.service...
Oct 27 08:53:01 zammad systemd[1]: zammad.service: Deactivated successfully.
Oct 27 08:53:01 zammad systemd[1]: Stopped zammad.service.
Oct 27 08:53:01 zammad systemd[1]: Started zammad.service.
Oct 27 08:53:01 zammad systemd[1]: Started zammad-web.service.
Oct 27 08:53:01 zammad systemd[1]: Started zammad-web-1.service.
Oct 27 08:53:01 zammad systemd[1]: Started zammad-websocket.service.
Oct 27 08:53:01 zammad systemd[1]: Started zammad-websocket-1.service.
Oct 27 08:53:01 zammad systemd[1]: Started zammad-worker.service.
Oct 27 08:53:01 zammad systemd[1]: Started zammad-worker-1.service.
Oct 27 08:53:01 zammad zammad[5462]: chroot: invalid group ‘domain’
Oct 27 08:53:01 zammad zammad[5467]: chroot: invalid group ‘domain’
Oct 27 08:53:01 zammad zammad[5464]: chroot: invalid group ‘domain’
Oct 27 08:53:01 zammad systemd[1]: zammad-web-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:01 zammad systemd[1]: zammad-web-1.service: Failed with result 'exit-code'.
Oct 27 08:53:01 zammad systemd[1]: zammad-websocket-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:01 zammad systemd[1]: zammad-websocket-1.service: Failed with result 'exit-code'.
Oct 27 08:53:01 zammad systemd[1]: zammad-worker-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:01 zammad systemd[1]: zammad-worker-1.service: Failed with result 'exit-code'.
Oct 27 08:53:01 zammad systemd[1]: zammad-web-1.service: Scheduled restart job, restart counter is at 1.
Oct 27 08:53:01 zammad systemd[1]: zammad-websocket-1.service: Scheduled restart job, restart counter is at 1.
Oct 27 08:53:01 zammad systemd[1]: zammad-worker-1.service: Scheduled restart job, restart counter is at 1.
Oct 27 08:53:01 zammad systemd[1]: Started zammad-web-1.service.
Oct 27 08:53:01 zammad systemd[1]: Started zammad-websocket-1.service.
Oct 27 08:53:01 zammad systemd[1]: Started zammad-worker-1.service.
Oct 27 08:53:02 zammad zammad[5549]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad zammad[5550]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad zammad[5552]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Scheduled restart job, restart counter is at 2.
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Scheduled restart job, restart counter is at 2.
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Scheduled restart job, restart counter is at 2.
Oct 27 08:53:02 zammad systemd[1]: Started zammad-web-1.service.
Oct 27 08:53:02 zammad systemd[1]: Started zammad-websocket-1.service.
Oct 27 08:53:02 zammad systemd[1]: Started zammad-worker-1.service.
Oct 27 08:53:02 zammad zammad[5633]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad zammad[5634]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad zammad[5640]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Scheduled restart job, restart counter is at 3.
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Scheduled restart job, restart counter is at 3.
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Scheduled restart job, restart counter is at 3.
Oct 27 08:53:02 zammad systemd[1]: Started zammad-web-1.service.
Oct 27 08:53:02 zammad systemd[1]: Started zammad-websocket-1.service.
Oct 27 08:53:02 zammad systemd[1]: Started zammad-worker-1.service.
Oct 27 08:53:02 zammad zammad[5717]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad zammad[5718]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad zammad[5725]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Scheduled restart job, restart counter is at 4.
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Scheduled restart job, restart counter is at 4.
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Scheduled restart job, restart counter is at 4.
Oct 27 08:53:02 zammad systemd[1]: Started zammad-web-1.service.
Oct 27 08:53:02 zammad systemd[1]: Started zammad-websocket-1.service.
Oct 27 08:53:02 zammad systemd[1]: Started zammad-worker-1.service.
Oct 27 08:53:02 zammad zammad[5801]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad zammad[5802]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad zammad[5805]: chroot: invalid group ‘domain’
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Main process exited, code=exited, status=125/n/a
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Scheduled restart job, restart counter is at 5.
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Scheduled restart job, restart counter is at 5.
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Scheduled restart job, restart counter is at 5.
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Start request repeated too quickly.
Oct 27 08:53:02 zammad systemd[1]: zammad-web-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad systemd[1]: Failed to start zammad-web-1.service.
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Start request repeated too quickly.
Oct 27 08:53:02 zammad systemd[1]: zammad-websocket-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad systemd[1]: Failed to start zammad-websocket-1.service.
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Start request repeated too quickly.
Oct 27 08:53:02 zammad systemd[1]: zammad-worker-1.service: Failed with result 'exit-code'.
Oct 27 08:53:02 zammad systemd[1]: Failed to start zammad-worker-1.service.

That sounds environment specific. Not sure what you did, but it’s not default for sure.
You might want to double check on that regard.

Alternatively, a systemctl stop zammad; sleep 10; systemctl start zammad might also help. Altough it shouldn’t make any difference.

Yes. Absolutely fine and normal.

I’ve fixed that invalid group error when restarting (changed permissions for the whole /opt/zammad folder), but when I try zammad run rake assets:precompile I’m still getting that error. Is there another place where I might need to set permissions for that command?

update: if I su to the zammad user I can run zammad run rake assets:precompile.

Anyone coming here in the future: I am using a domain joined linux vm. chroot: invalid group ‘domain’ is an error relating to the user’s group being “domain users”, but failing to read the group name correctly.

1 Like

zammad run (...) is to be run either as root or zammad user.

Regarding your permission changes:
The permission of /opt/zammad/ have to be zammad:zammad.

Latest with a Zammad update, the package installation will enforce this.

Further follow up to this case:

I believe there is a bug somewhere in zammad or one of its dependencies. I don’t know if it’ll ever be fixed, but here’s what I’ve found:

We have a domain joined linux VM running zammad (packaged). This means that there is a group in the system called “domain users”. The error we were seeing (zammad[5462]: chroot: invalid group ‘domain’) was something somewhere trying to enumerate all of the groups on the system, and failing because one of the groups had a space in it. Not even one of the groups involved in running zammad, just one of the groups returned by pam or whatever.

The workaround is:

  • (if using sssd as part of your domain join) add a line to /etc/sssd/sssd.conf under “[sssd]” that says override_space = ~ (the ~ being the character you want to replace spaces with)
  • (if not joined to a domain) make sure none of your groups have spaces in them, I guess?

If there’s somewhere else I should submit this as an official bug, let me know. Otherwise we’re satisfied with the workaround.

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