Zammad not starting after migration from CentOS7 to Ubuntu 18.04

Hi,

I want to clean up some stuff and one part is to move my Zammad installation to a new VM. The old installation is running on CentOS7, for the new installation I’ve set up Zammad on Ubuntu 18.04 LTS which is also supported. Both installations are standard installs using the package manager and are at the latest version.

So following the docs, I’ve created a backup using the backup script and restored it also via the script. Unfortunately Zammad is not starting and throws the error:

Jun 27 11:43:31 zammad-websocket-1.service[3014]: bundler: failed to load command: script/websocket-server.rb (script/websocket-server.rb)
Jun 27 11:43:31 zammad-websocket-1.service[3014]: LoadError: library not found for class Digest::SHA1 -- digest/sha1

What is going wrong here? Do I need to manually install some stuff?

Also the restore script reported this error:

bundler: failed to load command: rake (/opt/zammad/vendor/bundle/ruby/2.6.0/bin/rake)
LoadError: library not found for class Digest::SHA1 -- digest/sha1

Any idea how to solve the issue?

Now it’s getting fully strange!

Having no option I spun a CentOS 7 VM, which is exactly the same OS as the source machine. Zammad is at the same version as well.

Restore script throws errors, Zammad is not starting. Checking the Postgres databases showed me:

My original Zammad installation names the DB “zammad_production”
The new Installation - SAME OS! SAME Zammad version - uses the database “zammad”

How can this be that the same Zammad version on the same OS version uses different databases? And how can I fix this in the restore script?

I finally managed to at least migrate Zammad to a new CentOS 7 VM and to work around the issue with different database names “zammad” (new) and “zammad_production” (old installation). I’ll post the woraround here:

First I took the backup with the backup script in the old installation and transferred the directory /var/tmp/zammad-backup to the new machine.

I’ve added a wait line in the restore process in line 161 of /opt/zammad/contrib/backup/functions to wait for the enter key:

  echo "# Ensuring correct file rights ..."
  chown -R zammad:zammad ${ZAMMAD_DIR}

  read -p "Press enter to continue"

  if [ "${DB_ADAPTER}" == "postgresql" ]; then
    echo "# ... Dropping current database ${DB_NAME}"

Then I’ve started the restore script on the new Zammad installation until it shows me “Press enter to eontinue” due to my modification.
At this point I’ve started a second SSH session and opened /opt/zammad/config/database.yml. This file was replaced by the file restore, so the database name is now “zammad_production” instead of “zammad”. Also it may contain a password for the Postgres access which a new Zammad installation does not need. So you need to change these two lines in the file:

  database: zammad_production
  ...
  password: *********

into:

  database: zammad
  ...
  password:

After that change is saved back, you can press “enter” in the first SSH session and the restore will continue. Zammad should start properly after this.

Glad you could solve that issue.
Just a small side note from my end:

The file /opt/zammad/config/database.yml provides the database name which you can safely change if needed. Our scripts will adapt to these information.

Please keep in mind that restoring a backup (from a selfhosted instance) does reset above mentioned file.

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