I try to migrate to a new server.
old server:
- Debian 10
- Zammad 4.1.1 installed from packages
new server:
- Debian 10
- Zammad 5.0.1 installed from packages
I used zammad_backup.sh on the old server. I installed a fresh zammad
on the new server and run zammad_restore.sh:
root@support:/opt/zammad/contrib/backup# ./zammad_restore.sh
# Zammad restored started - Fri Oct 22 09:52:09 CEST 2021!
The restore will delete your current config and database!
Be sure to have a backup available!
Enter 'yes' if you want to proceed!
Restore?: yes
Enter file date to restore:
20211016044201
20211017044201
20211018044201
20211019044201
20211020044201
20211021044201
File date: 20211021044201
Enter db date to restore:
20211016044201
20211017044201
20211018044201
20211019044201
20211020044201
20211021044201
DB date: 20211021044201
# Stopping Zammad
# Checking requirements
# ... Dropping current database zammad
Dropped database 'zammad'
# ... Creating database zammad for owner zammad
CREATE DATABASE
# Restoring PostgreSQL DB
psql: FATAL: Peer authentication failed for user "zammad"
# Restoring Files
# Ensuring correct file rights ...
# Clearing Cache ...
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/railtie/configuration.rb:97:in `method_missing': undefined method `websocket_session_store' for #<Rails::Application::Configuration:0x000055fc03598800> (NoMethodError)
from /opt/zammad/config/initializers/log_websocket_session_store.rb:3:in `<main>'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies.rb:285:in `block in load'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies.rb:257:in `load_dependency'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies.rb:285:in `load'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/engine.rb:663:in `block in load_config_initializer'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/notifications.rb:170:in `instrument'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/engine.rb:662:in `load_config_initializer'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/engine.rb:619:in `each'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/engine.rb:619:in `block in <class:Engine>'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/initializable.rb:32:in `instance_exec'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/initializable.rb:32:in `run'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/initializable.rb:61:in `block in run_initializers'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/initializable.rb:50:in `each'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/initializable.rb:50:in `tsort_each_child'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:415:in `call'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:415:in `each_strongly_connected_component_from'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:347:in `each'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:347:in `call'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
from /opt/zammad/vendor/ruby-2.6.8/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/initializable.rb:60:in `run_initializers'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/application.rb:361:in `initialize!'
from /opt/zammad/config/environment.rb:5:in `<main>'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies.rb:291:in `block in require'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies.rb:257:in `load_dependency'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies.rb:291:in `require'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/application.rb:337:in `require_environment!'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/command/actions.rb:28:in `require_environment!'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/commands/runner/runner_command.rb:29:in `perform'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/command/base.rb:69:in `perform'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/command.rb:46:in `invoke'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/commands.rb:18:in `<main>'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies.rb:291:in `block in require'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies.rb:257:in `load_dependency'
from /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies.rb:291:in `require'
from /opt/zammad/bin/rails:9:in `<main>'
./zammad_restore.sh: line 39: _zammad: command not found
# Starting Zammad
# Zammad restored successfully - Fri Oct 22 09:52:49 CEST 2021!
After restore I get “502 Bad Gateway” in the browser.
2021/10/22 10:17:47 [error] 7466#7466: *42 connect() failed (111: Connection refused) while connecting to upstream, client: 91.5.25.xyz, server: support.abc.com, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:3000/", host: "support.abc.com"
no service lists on port 3000
the services zammad-web, zammad-worker and zammad-websocket are active and running.
Any ideas what wents wrong?
Kind regards,
Thomas