Zammad doesn't work after upgrade

Infos:

  • Used Zammad version: 6.2.0-1709819739.c4f4ca8b.jammy
  • Used Zammad installation type: package
  • Operating system: Ubuntu 22.04.4 LTS
  • Browser + version: Google Chome 122.0.6261.112

Expected behavior:

  • Zammad starts and works

Actual behavior:

  • Zammad doesn’t work

Steps to reproduce the behavior:

  • After an upgrade, zammad refuse to start properly.
Mar 08 12:29:24 support systemd[1]: Started zammad-web-1.service.
Mar 08 12:29:26 support systemd[1]: /etc/systemd/system/zammad-web-1.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, a>
Mar 08 12:29:26 support systemd[1]: /etc/systemd/system/zammad-web-1.service:11: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, a>
Mar 08 12:29:28 support zammad-web-1.service[546]: bundler: failed to load command: script/rails (script/rails)
Mar 08 12:29:28 support zammad-web-1.service[546]: /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require': cannot>
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/vite_ruby-3.3.4/lib/vite_ruby.rb:8:in `<main>'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `req>
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `req>
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/vite_rails-3.0.17/lib/vite_rails.rb:3:in `<main>'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `req>
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `req>
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:60:in `block (2 levels) in require'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:55:in `each'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:55:in `block in require'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:44:in `each'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:44:in `require'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler.rb:186:in `require'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/config/application.rb:13:in `<main>'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `req>
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `req>
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands/server/server_command.rb:137:in `block in perf>
Mar 08 12:29:28 support zammad-web-1.service[546]:         from <internal:kernel>:90:in `tap'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands/server/server_command.rb:134:in `perform'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/command/base.rb:87:in `perform'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/command.rb:48:in `invoke'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands.rb:18:in `<main>'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `req>
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `req>
Mar 08 12:29:28 support zammad-web-1.service[546]:         from script/rails:8:in `<top (required)>'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `load'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `kernel_load'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/cli/exec.rb:23:in `run'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/cli.rb:486:in `exec'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/cli.rb:31:in `dispatch'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
Mar 08 12:29:28 support zammad-web-1.service[546]:         from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/cli.rb:25:in `start'

There seems something missing, but it isn’t clear to me what’s missing.

There was another update

But during the update process I also see error’s about “zeitwerk”
What is “zeitwerk” and how do I fix it?

# Enabling Zammad on boot
# Stopping Zammad
# Clear cache...
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require': cannot load such file -- zeitwerk (LoadError)
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/vite_ruby-3.3.4/lib/vite_ruby.rb:8:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/vite_rails-3.0.17/lib/vite_rails.rb:3:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:60:in `block (2 levels) in require'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:55:in `each'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:55:in `block in require'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:44:in `each'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:44:in `require'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler.rb:186:in `require'
        from /opt/zammad/config/application.rb:13:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/command/actions.rb:22:in `require_application!'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/command/actions.rb:14:in `require_application_and_environment!'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands/runner/runner_command.rb:33:in `perform'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/command/base.rb:87:in `perform'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/command.rb:48:in `invoke'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands.rb:18:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/bin/rails:5:in `<main>'
# database.yml found. Updating db...
rake aborted!

It broke when I upgraded from 6.2.0-1709819739.c4f4ca8b.jammy to 6.2.0-1709902372.e5509ee8.jammy

I downgraded, but that didn’t solve the issue.
I suspect a dependency is also updated which causes this issue. :pensive:

Anyone any idea? I’m stuck right with this.

Any help would be appreciated

Hi @hvwees. Is it possible to execute bundle exec rails zeitwerk:check as Zammad user? Not sure, just guessing.

1 Like

Thank you for your help

bundle exec rails zeitwerk:check
bundler: command not found: rails
Install missing gem executables with `bundle install`

So I tried to bundle install, it seems i’ve got an incorrect ruby version.

bundle install
Your Ruby version is 3.0.2, but your Gemfile specified 3.1.3

Version 3.1.3 doesn’t seem to be available in the repos.

Zammad package installations come with bre-bundled ruby. You don’t have to install any dependencies around it at all.

Instead of bundle exec ... use zammad run ... for a package installation.

zammad run rails zeitwerk:check is the right command I guess…

1 Like

If I understand you correctly, there must be somehow a depency issue in the package.

zammad run rails zeitwerk:check --trace
rails aborted!
LoadError: cannot load such file -- zeitwerk
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/vite_ruby-3.3.4/lib/vite_ruby.rb:8:in `<main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/vite_rails-3.0.17/lib/vite_rails.rb:3:in `<main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:60:in `block (2 levels) in require'
/opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:55:in `each'
/opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:55:in `block in require'
/opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:44:in `each'
/opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler/runtime.rb:44:in `require'
/opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/bundler.rb:186:in `require'
/opt/zammad/config/application.rb:13:in `<main>'
/opt/zammad/Rakefile:7:in `require_relative'
/opt/zammad/Rakefile:7:in `<main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/command.rb:51:in `invoke'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands.rb:18:in `<main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/opt/zammad/bin/rails:5:in `<main>'

Should I install/reinstall the “zeitwerk” package?

No you did not understand me at all. Sorry I’ll step out at this point.

I think this issue is super weird, how can a packaged installation break on an upgrade?
I guess we’ll never know.

I purged the zammad packages and reinstalled the package now it seems to work again. (without purge it didn’t work).

Putting back the storage folder and check if I need to put back anything else, but I think that isn’t necessary as all the other data should be in the database.

I thank @fliebe92 for the hints in the right direction.

As I said in your other thread.
You most likely did something else before upgrading that nobody knows of (but possibly you) which may cause this kind of issue.

It was just an apt update and a apt upgrade.

Anyway, it work again and I’m happy again.

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