Migrating 3.4.0 to 5.3.0

Hello, we have an old unmaintained Zammad 3.4.0 installation on SLES using the
https://dl.packager.io/srv/rpm/zammad/zammad/develop/sles/12/x86_64
repo

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:

cat /etc/zammad/zammad.env
BUNDLE_BINARY=bundle
RAILS_ENV=production
ZAMMAD_BIND_IP=127.0.0.1
ZAMMAD_RAILS_PORT=3000
ZAMMAD_WEBSOCKET_PORT=6042

cat /etc/zammad/conf.d/other 
#export ZAMMAD_BIND_IP="0.0.0.0"
#export ZAMMAD_BIND_IP='[::1]'

/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.

Just noting; be sure to follow the upgrade path as described in the documentation when making such large version leaps:

https://docs.zammad.org/en/latest/install/update.html

2 Likes

Thanks. So it seems to use
adapter: mysql2
Can I migrate that on the way to Postgres as the docker-compose seems to use Postgres as default?

There’s a doc for the migration to postgres.

2 Likes

For this large migration step, how would I go the major versions migration path using docker-compose?
From Updating Zammad — Zammad documentation I read:

$ docker-compose stop
$ git pull
$ docker-compose pull
$ docker-compose up

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?

For the first step I start with

commit ab745072cd970226dc80ac8876f57b81ebe22d3f (HEAD)
Author: André Bauer <monotek@users.noreply.github.com>
Date:   Tue Jun 8 17:08:48 2021 +0200

    update zammad to 4.1.0 (#214)
    
    * update to 4.1.0
    
    Signed-off-by: André Bauer <monotek23@gmail.com>

So I did

$ docker container rm zammad-docker-compose_zammad-backup_1 zammad-docker-compose_zammad-nginx_1 zammad-docker-compose_zammad-scheduler_1 zammad-docker-compose_zammad-websocket_1 zammad-docker-compose_zammad-railsserver_1 zammad-docker-compose_zammad-init_1 zammad-docker-compose_zammad-memcached_1 zammad-docker-compose_zammad-postgresql_1 zammad-docker-compose_zammad-redis_1 zammad-docker-compose_zammad-elasticsearch_1
$ docker image rm f3e2e8cfe803 ffd287e43d20 18cfb332778c 9104349146d9 fb873e3c2a61 cc994726847f ac95006e92d1 a0132b3398e4 c50fe68a1639 0d687e71bd02 575ec445c87e
$ docker volume prune
$ git checkout ab745072cd970226dc80ac8876f57b81ebe22d3f
HEAD is now at ab74507 update zammad to 4.1.0 (#214)
$ docker-compose pull
Pulling zammad-memcached     ... done
Pulling zammad-postgresql    ... done
Pulling zammad-elasticsearch ... done
Pulling zammad-railsserver   ... done
Pulling zammad-backup        ... done
Pulling zammad-websocket     ... done
Pulling zammad-nginx         ... done
Pulling zammad-scheduler     ... done
Pulling zammad-init          ... done 
$ docker-compose up

The docker-compose up never finshes. Again, I’m in a infinite install loop, similar to Docker-compose, postgresql database files are incompatible with server #2 - #2 by mssm

...
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...
...

What I’m doing wrong with docker-compose?

Is this the right place to ask about docker-compose or should that rather go to their github project?

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.

  1. Migrating MariaDB to Postgres on Zammad 3.4.0:
    Failed because Zammad is too old:
    Migrate to PostgreSQL, rake aborted, Ruby Version Mismatch

  2. 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.

  3. Install with Docker Compose:
    This worked after several approaches:
    Docker-compose, postgresql database files are incompatible with server
    Docker-compose, postgresql database files are incompatible with server #2
    But as we need to start with Zammad 4.0.0 for step-wise upgrade, it failed to sync the docker-compose to that version:
    Migrating 3.4.0 to 5.3.0 - #7 by mssm

  4. Using Docker-compose with MariaDB:
    Not possible:
    Migrate to PostgreSQL, rake aborted, Ruby Version Mismatch - #10 by MrGeneration

  5. Install from source on OpenSuse TW:
    Elasticsearch fails to start:
    Installing from source, Elasticsearch does not start

  6. Install from package on recent Ubuntu 22.10:
    Obviously failed due to version mismatch.

  7. 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)
  1. 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,...

uhm
 isn’t this a zammad 4.0 repo supporting Ubuntu 20.04?

All needed package repos to do a step-wise upgrade are still present AFAIK.

cheers

Sorry but you seem to be mixing installation methods.
That’s very dangerous to do.

If you’re using the package installation, you will not have to install ruby on your own (documentation also doesn’t state you’d have to :))

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:

{"error":"uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQL::OID"}

Looking at the logs I find:

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?

Why does any PostgreSQL error appear after switching to the MySQL adapter, which appearently worked as we can see our custom login screen?

E, [2023-01-26T17:22:11.572108 #396254-47136976139880] ERROR -- : uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQL::OID (NameError)
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/inflector/methods.rb:285:in `const_get'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/inflector/methods.rb:285:in `block in constantize'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/inflector/methods.rb:281:in `each'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/inflector/methods.rb:281:in `inject'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/inflector/methods.rb:281:in `constantize'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/core_ext/string/inflections.rb:68:in `constantize'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/core_ext/marshal.rb:10:in `rescue in load'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/core_ext/marshal.rb:5:in `load'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/cache.rb:804:in `uncompress'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/cache.rb:726:in `value'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/cache.rb:358:in `block in read'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/cache.rb:663:in `block in instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/notifications.rb:170:in `instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/cache.rb:663:in `instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/cache.rb:345:in `read'
/opt/zammad/lib/cache.rb:47:in `get'
/opt/zammad/app/models/application_model/has_cache.rb:50:in `cache_get'
/opt/zammad/app/models/application_model/can_lookup.rb:28:in `lookup'
/opt/zammad/app/models/concerns/can_be_authorized.rb:36:in `block in acceptable_permissions_for'
/opt/zammad/app/models/concerns/can_be_authorized.rb:36:in `reject'
/opt/zammad/app/models/concerns/can_be_authorized.rb:36:in `acceptable_permissions_for'
/opt/zammad/app/models/concerns/can_be_authorized.rb:23:in `permissions?'
/opt/zammad/app/models/concerns/has_groups.rb:202:in `groups_access_permission?'
/opt/zammad/app/models/concerns/has_groups.rb:209:in `groups_access_map'
/opt/zammad/app/models/concerns/has_groups.rb:173:in `group_ids_access_map'
/opt/zammad/app/models/application_model/can_associations.rb:156:in `attributes_with_association_ids'
/opt/zammad/app/models/user/assets.rb:35:in `assets'
/opt/zammad/lib/session_helper.rb:17:in `default_collections'
/opt/zammad/lib/session_helper.rb:3:in `json_hash'
/opt/zammad/app/controllers/sessions_controller.rb:15:in `create'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/abstract_controller/base.rb:194:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/opt/zammad/app/controllers/application_controller/has_secure_content_security_policy_for_downloads.rb:18:in `block (4 levels) in <module:HasSecureContentSecurityPolicyForDownloads>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/notifications.rb:180:in `subscribed'
/opt/zammad/app/controllers/application_controller/has_secure_content_security_policy_for_downloads.rb:17:in `block (3 levels) in <module:HasSecureContentSecurityPolicyForDownloads>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/notifications.rb:180:in `subscribed'
/opt/zammad/app/controllers/application_controller/has_secure_content_security_policy_for_downloads.rb:16:in `block (2 levels) in <module:HasSecureContentSecurityPolicyForDownloads>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:118:in `instance_exec'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/zammad/app/controllers/application_controller/handles_transitions.rb:14:in `handle_transaction'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:136:in `run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/abstract_controller/callbacks.rb:41:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_controller/metal/rescue.rb:22:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/notifications.rb:168:in `block in instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/notifications.rb:168:in `instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/abstract_controller/base.rb:134:in `process'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionview-5.2.4.6/lib/action_view/rendering.rb:32:in `process'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_controller/metal.rb:191:in `dispatch'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_controller/metal.rb:252:in `dispatch'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/journey/router.rb:35:in `each'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/journey/router.rb:35:in `serve'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/routing/route_set.rb:840:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:420:in `call_app!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-saml-1.10.1/lib/omniauth/strategies/saml.rb:89:in `other_phase'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:190:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/builder.rb:45:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:98:in `run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/rack/logger.rb:38:in `call_app'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/rack/logger.rb:26:in `block in call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/tagged_logging.rb:71:in `block in tagged'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/tagged_logging.rb:28:in `tagged'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/tagged_logging.rb:71:in `tagged'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/rack/logger.rb:26:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/middleware/executor.rb:14:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.6/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.6/lib/rails/engine.rb:524:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/puma-4.3.8/lib/puma/configuration.rb:228:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/puma-4.3.8/lib/puma/server.rb:718:in `handle_request'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/puma-4.3.8/lib/puma/server.rb:472:in `process_client'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/puma-4.3.8/lib/puma/server.rb:328:in `block in run'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/puma-4.3.8/lib/puma/thread_pool.rb:134:in `block in spawn_thread'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
I, [2023-01-26T17:22:11.577398 #396254-47136976139880]  INFO -- : Completed 500 Internal Server Error in 95ms (Views: 0.2ms | ActiveRecord: 14.8ms)

I found Migration Zammad to new Server: uninitialized constant ActiveRecord - #4 by tortyl
and tried as root user:
zammad run rails r ‘Cache.clear’
but I get

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.

Copy/Paste of the quotes was failing, it works with zammad run rails r "Cache.clear".
Now it looks like a real Migration issue:

E, [2023-01-30T11:21:53.527321 #558225-47218813900420] ERROR -- : Mysql2::Error: Unknown column 'stats_stores.stats_storable_type' in 'where clause': SELECT `stats_stores`.* FROM `stats_stores` WHERE `stats_stores`.`stats_storable_type` = 'User' AND `stats_stores`.`stats_storable_id` = 21 AND `stats_stores`.`key` = 'dashboard' LIMIT 1 (ActiveRecord::StatementInvalid)

I tried smaller update steps now, starting with:
3.5.0-1605097372.e4949483.focal: Worked
3.6.0-1615986441.da478686.focal Failing:

E, [2023-02-01T13:07:18.707990 #650307-46981028581760] ERROR -- : Mysql2::Error: Unknown column 'stats_stores.stats_storable_type' in 'where clause': SELECT  `stats_stores`.* FROM `stats_stores` WHERE `stats_stores`.`stats_storable_type` = 'User' AND `stats_stores`.`stats_storable_id` = 21 AND `stats_stores`.`key` = 'dashboard' LIMIT 1 (ActiveRecord::StatementInvalid)
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `block in query'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `handle_interrupt'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `query'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:187:in `block (2 levels) in execute'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:186:in `block in execute'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract_adapter.rb:581:in `block (2 levels) in log'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract_adapter.rb:580:in `block in log'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract_adapter.rb:571:in `log'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:185:in `execute'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/mysql/database_statements.rb:28:in `execute'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:196:in `execute_and_free'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/mysql/database_statements.rb:33:in `exec_query'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/database_statements.rb:478:in `select'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/database_statements.rb:70:in `select_all'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/query_cache.rb:104:in `block in select_all'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/query_cache.rb:127:in `block in cache_sql'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/query_cache.rb:113:in `cache_sql'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/query_cache.rb:104:in `select_all'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/mysql/database_statements.rb:12:in `select_all'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/querying.rb:41:in `find_by_sql'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/relation.rb:560:in `block in exec_queries'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/relation.rb:547:in `exec_queries'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/relation.rb:422:in `load'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/relation.rb:200:in `records'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/relation/finder_methods.rb:504:in `find_take'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/relation/finder_methods.rb:103:in `take'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/relation/finder_methods.rb:81:in `find_by'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/querying.rb:9:in `find_by'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/core.rb:192:in `find_by'
/opt/zammad/app/controllers/sessions/collection_dashboard.rb:10:in `session'
/opt/zammad/lib/session_helper.rb:24:in `block in default_collections'
/opt/zammad/lib/session_helper.rb:22:in `each'
/opt/zammad/lib/session_helper.rb:22:in `default_collections'
/opt/zammad/lib/session_helper.rb:3:in `json_hash'
/opt/zammad/app/controllers/sessions_controller.rb:45:in `show'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/abstract_controller/base.rb:194:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/opt/zammad/app/controllers/application_controller/has_secure_content_security_policy_for_downloads.rb:18:in `block (4 levels) in <module:HasSecureContentSecurityPolicyForDownloads>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/notifications.rb:180:in `subscribed'
/opt/zammad/app/controllers/application_controller/has_secure_content_security_policy_for_downloads.rb:17:in `block (3 levels) in <module:HasSecureContentSecurityPolicyForDownloads>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/notifications.rb:180:in `subscribed'
/opt/zammad/app/controllers/application_controller/has_secure_content_security_policy_for_downloads.rb:16:in `block (2 levels) in <module:HasSecureContentSecurityPolicyForDownloads>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/callbacks.rb:118:in `instance_exec'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/zammad/app/controllers/application_controller/handles_transitions.rb:14:in `handle_transaction'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/callbacks.rb:136:in `run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/abstract_controller/callbacks.rb:41:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_controller/metal/rescue.rb:22:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/notifications.rb:168:in `block in instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/notifications.rb:168:in `instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.5/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/abstract_controller/base.rb:134:in `process'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionview-5.2.4.5/lib/action_view/rendering.rb:32:in `process'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_controller/metal.rb:191:in `dispatch'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_controller/metal.rb:252:in `dispatch'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/journey/router.rb:35:in `each'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/journey/router.rb:35:in `serve'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/routing/route_set.rb:840:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:420:in `call_app!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-saml-1.10.1/lib/omniauth/strategies/saml.rb:89:in `other_phase'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:190:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/builder.rb:45:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/callbacks.rb:98:in `run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.5/lib/rails/rack/logger.rb:38:in `call_app'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.5/lib/rails/rack/logger.rb:26:in `block in call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/tagged_logging.rb:71:in `block in tagged'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/tagged_logging.rb:28:in `tagged'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/tagged_logging.rb:71:in `tagged'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.5/lib/rails/rack/logger.rb:26:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/middleware/executor.rb:14:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.4.5/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.5/lib/rails/engine.rb:524:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/puma-3.12.6/lib/puma/configuration.rb:227:in `call'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:706:in `handle_request'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:476:in `process_client'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:334:in `block in run'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/puma-3.12.6/lib/puma/thread_pool.rb:135:in `block in spawn_thread'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

This was reported already, so I try to follow Zammad crashed after 3.6 update? - #15 by bastolino
followed up here: Zammad crashed after 3.6 update? #2
After changing db/migrate/20200121000001_smime_support.rb and doing the manual migrate as zammad user I get:

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>'

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