and are now going to migrate to a new Zammad.
The new one was installed via docker-compose on OpenSuse LEAP as there is no Zammad repository for that operating system.
The new Zammad is up and running.
How can I see which database the old Zammad was using?
The only configurations I found is this:
/opt/zammad/config/database.yml seems to contain the database configuration. If there are no parameters âHostâ and âPortâ it means the database server is on localhost.
How would I pull to major versions 4.0 â 5.0 â latest stable accordingly?
Versions on the docker-compose repo donât match the zammad major releases?
...
zammad-init_1 | == 20210607000000 SessionTimeoutDescription: migrated (0.0007s) ===============
zammad-init_1 |
zammad-init_1 | I, [2022-12-19T13:37:54.217769 #23-47210286045540] INFO -- : Migrating to SettingAddInternalArticleCheck (202104070000001)
zammad-init_1 | == 202104070000001 SettingAddInternalArticleCheck: migrating ==================
zammad-init_1 | == 202104070000001 SettingAddInternalArticleCheck: migrated (0.0011s) =========
zammad-init_1 |
zammad-railsserver_1 | waiting for init container to finish install or update...
zammad-scheduler_1 | waiting for init container to finish install or update...
zammad-websocket_1 | waiting for init container to finish install or update...
zammad-nginx_1 | waiting for init container to finish install or update...
zammad-railsserver_1 | waiting for init container to finish install or update...
zammad-scheduler_1 | waiting for init container to finish install or update...
zammad-websocket_1 | waiting for init container to finish install or update...
zammad-nginx_1 | waiting for init container to finish install or update...
zammad-railsserver_1 | waiting for init container to finish install or update...
zammad-scheduler_1 | waiting for init container to finish install or update...
zammad-websocket_1 | waiting for init container to finish install or update...
zammad-nginx_1 | waiting for init container to finish install or update...
zammad-backup_1 | waiting for railsserver to be ready...
zammad-railsserver_1 | waiting for init container to finish install or update...
zammad-scheduler_1 | waiting for init container to finish install or update...
zammad-websocket_1 | waiting for init container to finish install or update...
zammad-nginx_1 | waiting for init container to finish install or update...
zammad-railsserver_1 | waiting for init container to finish install or update...
zammad-scheduler_1 | waiting for init container to finish install or update...
zammad-websocket_1 | waiting for init container to finish install or update...
zammad-nginx_1 | waiting for init container to finish install or update...
zammad-railsserver_1 | waiting for init container to finish install or update...
zammad-scheduler_1 | waiting for init container to finish install or update...
zammad-websocket_1 | waiting for init container to finish install or update...
zammad-nginx_1 | waiting for init container to finish install or update...
zammad-railsserver_1 | waiting for init container to finish install or update...
zammad-scheduler_1 | waiting for init container to finish install or update...
zammad-websocket_1 | waiting for init container to finish install or update...
zammad-nginx_1 | waiting for init container to finish install or update...
zammad-railsserver_1 | waiting for init container to finish install or update...
zammad-scheduler_1 | waiting for init container to finish install or update...
zammad-websocket_1 | waiting for init container to finish install or update...
zammad-nginx_1 | waiting for init container to finish install or update...
zammad-init_1 | I, [2022-12-19T13:38:21.504742 #24-47045952452940] INFO -- : Can't fetch image for 'nicole.braun@zammad.org' (maybe no avatar available), http code: 0
zammad-init_1 | W, [2022-12-19T13:38:21.573627 #24-47045952452940] WARN -- : Scoped order is ignored, it's forced to be batch order.
zammad-init_1 | W, [2022-12-19T13:38:21.667679 #24-47045952452940] WARN -- : Scoped order is ignored, it's forced to be batch order.
zammad-init_1 | E, [2022-12-19T13:39:18.817359 #24-47045952452940] ERROR -- : https://geo.zammad.com/calendar: #<RuntimeError: 0/>
zammad-init_1 | base64: invalid input
zammad-railsserver_1 | waiting for init container to finish install or update...
zammad-scheduler_1 | waiting for init container to finish install or update...
zammad-websocket_1 | waiting for init container to finish install or update...
...
Ok. Some days soon we are going to cancel the use of Zammad because the migration has failed after many days, approaches and different ways to install. This here being the main and initial post I would like to summarize what was done and what has failed so far.
Install from package on OpenSuse LEAP 15.3:
Trying to use the https://dl.packager.io/srv/rpm/zammad/zammad/develop/sles/12/x86_64 repo obviously failed due to package conflicts.
Install from package on recent Ubuntu 22.10:
Obviously failed due to version mismatch.
Install from package on older Ubuntu 20.04: This worked. However there is no historical repo to switch back to Zammad 4.0.0 in order to do the step-wise migration.
We tried migrating from 3.4.0 anyway, imported and connected our MariaDB and it seems to be failing on DB migration:
E, [2023-01-20T13:30:15.585632 #30962-111940] ERROR -- : Mysql2::Error: Table 'zammad_production.mentions' doesn't exist (ActiveRecord::StatementInvalid)
E, [2023-01-20T13:30:15.591787 #30962-111940] ERROR -- : execute Ticket.process_escalation (try_count 0) exited with error #<NameError: uninitialized constant Transaction::Karma> in: 0.104320367 seconds.
E, [2023-01-20T13:30:16.610141 #30962-111940] ERROR -- : Mysql2::Error: Table 'zammad_production.mentions' doesn't exist (ActiveRecord::StatementInvalid)
E, [2023-01-20T13:30:21.613494 #30962-112460] ERROR -- : execute ImportJob.start_registered (try_count 0) exited with error #<ActiveRecord::StatementInvalid: Mysql2::Error: Table 'zammad_production.ldap_sources' doesn't exist> in: 0.122160206 seconds.
...
E, [2023-01-20T13:31:27.297338 #30962-113160] ERROR -- : Scheduler Generate user based stats. reached retry limit while being executed (BackgroundServices::Service::ProcessScheduledJobs::RetryLimitReachedError)
Install from sources on Ubuntu 20.04:
Following the guide but downloading wget https://ftp.zammad.com/zammad-4.0.0.tar.gz
The guide failed at the step bundle install: Your Ruby version is 3.0.4, but your Gemfile specified 2.6.6
I tried proceeding with
$ rvm install ruby-2.6.6
...
No binary rubies available for: ubuntu/20.04/x86_64/ruby-2.6.6.
...
No fallback URL could be found,...
All installation approaches are on separate Virtual Machines. Just the last Ubuntu approach, after package installation failed with the old database, I tried the source installation on the same machine.
@dvnkln, thanks. I realized my current Ubuntu repo already supports version history and I got the older Zammad installed like this: apt install zammad=4.0.0-1623071600.c99fb5c5.focal
After changing /opt/zammad/config/database.yml to use the MariaDB, I got connected to our login screen.
Now trying to login I get this from the webserver:
E, [2023-01-26T17:12:23.288198 #396267-47366089972000] ERROR -- : Unable to process post request to elasticsearch URL 'http://localhost:9200/zammad_production_user/_doc/21?pipeline=zammad132512762972'. Check the response and payload for detailed information:
E, [2023-01-26T17:12:23.295672 #396267-47366089972000] ERROR -- : Error performing SearchIndexJob (Job ID: 3d0ef722-f7c4-4b4d-ae64-fec3f91817f9) from DelayedJob(default) in 233.78ms: RuntimeError (Unable to process post request to elasticsearch URL 'http://localhost:9200/zammad_production_user/_doc/21?pipeline=zammad132512762972'. Check the response and payload for detailed information:
E, [2023-01-26T17:22:11.572108 #396254-47136976139880] ERROR -- : uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQL::OID (NameError)
Do you need the complete call stack of the last error?
Please specify a valid ruby command or the path of a script to run.
Run 'bin/rails runner -h' for help.
undefined local variable or method `âCache' for main:Object
This is the package âzammad=4.0.0-1623071600.c99fb5c5.focalâ installation on Ubuntu.
zammad@vmubuntu02-mb:~$ zammad run rake db:migrate --trace
Your RubyGems version (3.0.3) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3`
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/constants.rb:4: warning: already initialized constant Bundler::WINDOWS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/constants.rb:4: warning: previous definition of WINDOWS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/constants.rb:5: warning: already initialized constant Bundler::FREEBSD
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/constants.rb:5: warning: previous definition of FREEBSD was here
...
Iâve done a gem update --system 3.2.3 but migration is still failing:
$ zammad run rake db:migrate --trace
Your RubyGems version (3.0.3) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3`
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/constants.rb:4: warning: already initialized constant Bundler::WINDOWS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/constants.rb:4: warning: previous definition of WINDOWS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/constants.rb:5: warning: already initialized constant Bundler::FREEBSD
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/constants.rb:5: warning: previous definition of FREEBSD was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/constants.rb:6: warning: already initialized constant Bundler::NULL
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/constants.rb:6: warning: previous definition of NULL was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/rubygems_integration.rb:10: warning: already initialized constant Bundler::RubygemsIntegration::EXT_LOCK
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/rubygems_integration.rb:12: warning: previous definition of EXT_LOCK was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/current_ruby.rb:12: warning: already initialized constant Bundler::CurrentRuby::KNOWN_MINOR_VERSIONS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/current_ruby.rb:12: warning: previous definition of KNOWN_MINOR_VERSIONS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/current_ruby.rb:24: warning: already initialized constant Bundler::CurrentRuby::KNOWN_MAJOR_VERSIONS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/current_ruby.rb:27: warning: previous definition of KNOWN_MAJOR_VERSIONS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/current_ruby.rb:26: warning: already initialized constant Bundler::CurrentRuby::KNOWN_PLATFORMS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/current_ruby.rb:29: warning: previous definition of KNOWN_PLATFORMS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1186: warning: already initialized constant Bundler::FileUtils::Entry_::S_IF_DOOR
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/fileutils/lib/fileutils.rb:2165: warning: previous definition of S_IF_DOOR was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1444: warning: already initialized constant Bundler::FileUtils::Entry_::DIRECTORY_TERM
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/fileutils/lib/fileutils.rb:2461: warning: previous definition of DIRECTORY_TERM was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1499: warning: already initialized constant Bundler::FileUtils::OPT_TABLE
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/fileutils/lib/fileutils.rb:2569: warning: previous definition of OPT_TABLE was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1553: warning: already initialized constant Bundler::FileUtils::LOW_METHODS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/fileutils/lib/fileutils.rb:2627: warning: previous definition of LOW_METHODS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1560: warning: already initialized constant Bundler::FileUtils::METHODS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/fileutils/lib/fileutils.rb:2634: warning: previous definition of METHODS was here
rake aborted!
ArgumentError: Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/errors.rb:9:in `status_code'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/errors.rb:20:in `<class:GemfileError>'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/errors.rb:20:in `<module:Bundler>'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/errors.rb:3:in `<top (required)>'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler.rb:10:in `require'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler.rb:10:in `<top (required)>'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/setup.rb:6:in `require'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/setup.rb:6:in `<top (required)>'
/opt/zammad/config/boot.rb:3:in `require'
/opt/zammad/config/boot.rb:3:in `<top (required)>'
/opt/zammad/config/application.rb:1:in `require_relative'
/opt/zammad/config/application.rb:1:in `<top (required)>'
/opt/zammad/Rakefile:5:in `require_relative'
/opt/zammad/Rakefile:5:in `<top (required)>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/rake_module.rb:29:in `load'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/rake_module.rb:29:in `load_rakefile'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:703:in `raw_load_rakefile'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:104:in `block in load_rakefile'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:103:in `load_rakefile'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:82:in `block in run'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:80:in `run'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/opt/zammad/vendor/bundle/ruby/2.6.0/bin/rake:23:in `load'
/opt/zammad/vendor/bundle/ruby/2.6.0/bin/rake:23:in `<top (required)>'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli/exec.rb:58:in `load'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli/exec.rb:23:in `run'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli.rb:491:in `exec'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli.rb:34:in `dispatch'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli.rb:28:in `start'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/exe/bundle:45:in `block in <top (required)>'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/exe/bundle:33:in `<top (required)>'
bin/bundle:3:in `load'
bin/bundle:3:in `<main>'