Fresh installation of .deb fails on Debian 11


  • Used Zammad version: 5.0.3-1640164755.9ed29355.bullseye
  • Used Zammad installation type: package
  • Operating system: Debian 11

Expected behavior:

  • working installation

Actual behavior:

Installation fails with hundreds of lines of tracebacks, starting with:

# (Re)creating init scripts
Nothing to do.
Nothing to do.
Nothing to do.
# Enabling Zammad on boot
# Stopping Zammad
# Clear cache...
# database.yml found. Updating db...
rake aborted!
ActiveRecord::NoDatabaseError: FATAL:  role "zammad" does not exist

Steps to reproduce the behavior:

  • sudo apt install zammad

I removed both postgresql and zammad with apt --purge ... to get a clean state and started again, but the error remains the same.

Thanks in advance for any help!

PS: Documentation says for both Debian and Ubuntu:

$ apt install locales
$ locale-gen en_US.UTF-8
$ echo "LANG=en_US.UTF-8" > /etc/default/locale

This might work on Ubuntu, but not on Debian. Change it to:

$ apt install locales
$ sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen
$ echo "LANG=en_US.UTF-8" > /etc/default/locale

Can someone fix the docs, please?

I got one step further, i.e. many tables have been CREATEd, after typing:

sudo -i -u postgres
export DB=zammad
export DB_USER=zammad
export DB_PASS=theonefromdatabase.yml
echo "CREATE USER \"${DB_USER}\" WITH PASSWORD '${DB_PASS}';" | psql
createdb -E UTF8 ${DB} -O ${DB_USER}

And afterwards sudo apt install --reinstall zammad. But there was still an exception:

/connection_adapters/postgresql_adapter.rb:675:in `async_exec': ERROR:  insert or \
update on table "translations" violates foreign key constraint "fk_rails_d6e6d9635d" \
(PG::ForeignKeyViolation) DETAIL:  Key (created_by_id)=(1) is not present in table "users".

When I tried to create the admi account in the web interface, I got a similar error in the web browser: Couldn't find User with 'id'=1


sudo zammad run rake db:migrate
sudo zammad run rake db:seed
sudo apt install --reinstall zammad

it looks like everything works. I’m a little bit surprised, that so many manual steps are necessary and it was not completely intuitive to find them. But, hey, that’s the fun of free software :slight_smile:

Debian 11 is still not supported by Zammad:

Oops, I was sure that I checked if current stable/11/bullseye were supported.
Thanks for pointing that out!

I wonder if it is worth the trouble to install again, this time on Debian 10 (buster)…
At least, that way I can see, if I have the same problems.

PS: Looks like at least does support Debian 11 now:
pkgr/debian.yml at master · crohr/pkgr · GitHub

I personally would do that, especially since with Debian you can always update your distribution later when Zammad supports it. This way you can be sure to have a clean working install, but that’s just my personal opinion.

Yes, I upgraded dozens of servers, VMs, even containers (don’t laugh) from 10 to 11 without relevant problems.

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