Error eager_load_recursive

Hello everyone,
I installed the latest zammad version on Ubuntu 22.04 LTS. Also , I had a latest version of zammad on a Ubuntu server 16.04 LTS.
I created a backup on Ubuntu 16.04 with backup script and that was successful. Then I restored the backup on new server .
The backup restore was successful . Just I see this log during the restore process. Also, I have

/opt/zammad/vendor/bundle/ruby/3.1.0/gems/openssl-3.1.0/lib/openssl.so

file in this path .


After that I run below commands as documentation:

dpkg -r --force-depends zammad
apt install zammad
zammad run rails r "Rails.cache.clear"

But I have an error in this step.

zammad run rails r "Rails.cache.clear"
/opt/zammad/lib/mixin/required_sub_paths.rb:16:in `eager_load_recursive': wrong number of arguments (given 1, expected 2) (ArgumentError)
        from /opt/zammad/app/models/object_manager/attribute/validation/backend.rb:26:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:30:in `require'
        from /opt/zammad/app/models/object_manager/attribute/validation/future_past.rb:1:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:30:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/inflector/methods.rb:287:in `const_get'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/inflector/methods.rb:287:in `block in constantize'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/inflector/methods.rb:283:in `each'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/inflector/methods.rb:283:in `inject'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/inflector/methods.rb:283:in `constantize'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
        from /opt/zammad/lib/mixin/required_sub_paths.rb:27:in `block in eager_load_recursive'
        from /opt/zammad/lib/mixin/required_sub_paths.rb:19:in `each'
        from /opt/zammad/lib/mixin/required_sub_paths.rb:19:in `eager_load_recursive'
        from /opt/zammad/lib/mixin/has_backends.rb:15:in `block in <module:HasBackends>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/concern.rb:136:in `class_eval'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/concern.rb:136:in `append_features'
        from /opt/zammad/app/models/object_manager/attribute/validation.rb:2:in `include'
        from /opt/zammad/app/models/object_manager/attribute/validation.rb:2:in `<class:Validation>'
        from /opt/zammad/app/models/object_manager/attribute/validation.rb:1:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:30:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/inflector/methods.rb:287:in `const_get'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/inflector/methods.rb:287:in `block in constantize'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/inflector/methods.rb:283:in `each'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/inflector/methods.rb:283:in `inject'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/inflector/methods.rb:283:in `constantize'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
        from /opt/zammad/lib/models.rb:44:in `block in all'
        from <internal:dir>:220:in `glob'
        from /opt/zammad/lib/models.rb:34:in `all'
        from /opt/zammad/lib/models.rb:79:in `searchable'
        from /opt/zammad/config/initializers/models_searchable.rb:9:in `block in <main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:427:in `instance_exec'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:427:in `block in make_lambda'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:603:in `catch'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:603:in `block in default_terminator'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:199:in `block in halting'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in `block in invoke_before'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in `each'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in `invoke_before'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:105:in `run_callbacks'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/reloader.rb:88:in `prepare!'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/initializable.rb:32:in `instance_exec'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/initializable.rb:32:in `run'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/initializable.rb:61:in `block in run_initializers'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/tsort.rb:347:in `each'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/tsort.rb:347:in `call'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
        from /opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/initializable.rb:60:in `run_initializers'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/application.rb:391:in `initialize!'
        from /opt/zammad/config/environment.rb:7:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:38:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/dependencies.rb:332:in `block in require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/dependencies.rb:299:in `load_dependency'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/dependencies.rb:332:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/application.rb:367:in `require_environment!'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/command/actions.rb:28:in `require_environment!'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/commands/runner/runner_command.rb:33:in `perform'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/command/base.rb:69:in `perform'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/command.rb:48:in `invoke'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.4/lib/rails/commands.rb:18:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/bin/rails:5:in `<main>'

Also I have a 502 error on nginx log , which is related to upstream : upstream: “http://127.0.0.1:3000/
How can I solve this problem?

  • Used Zammad version: latest
  • Used Zammad installation type: package
  • Operating system: Ubuntu 22.04 LTS

Hi @Samirarahiqi,

it seems that your installation is somehow broken. I cannot find a file named app/models/object_manager/attribute/validation/backend.rb in Zammad 6.0.0…

Hi @fliebe92
Thank you for your answer. Then should I install zammad again from scratch ?
Also , I have this problem after restore backup. In first installation zammad was working correctly.
How can I solve that after restore process?

We have some documentation for this: Migrate Zammad to new host — Zammad documentation

Not sure if this helps you, but I guess it’s worth trying it.

I did all steps like this documentation. Also I did it for migrating from Centos 7 to Ubuntu 16.04 and that was successful , But Now I have this problem on this server

I’m sorry, maybe somebody else is able to help you out here, I am not that deep into the backup & restore topic. As I already mentioned, you have files that are no longer part of Zammad 6.0.0 and cause some trouble.

What about the following?

ldd /opt/zammad/vendor/bundle/ruby/3.1.0/gems/openssl-3.1.0/lib/openssl.so

When I run this command I see below result:

ldd /opt/zammad/vendor/bundle/ruby/3.1.0/gems/openssl-3.1.0/lib/openssl.so
        linux-vdso.so.1 (0x00007ffd9d7b6000)
        libssl.so.1.0.0 => not found
        libcrypto.so.1.0.0 => not found
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2f8dfd8000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f2f8e5b1000)

You either don’t use the correct repository file or ignored the forced reinstallation which is stated by the migration documentation. Zammad packages are version specific.

1 Like

Hi @MrGeneration

I run this command after restore completed successfully as documentation.
https://docs.zammad.org/en/latest/appendix/backup-and-restore/migrate-hosts.html
Step 9.1

dpkg -r --force-depends zammad

Do you mean this one?
If yes, should I install zammad again and then migration process? or is there other solution?

Yes I’m talking about that command.
The repository of Zammad on the affected machine does fit your distribution and OS version?

Can you provide its content?

Yes sure.
Do you mean this one ?!

/etc/apt/trusted.gpg.d# ll
total 24
drwxr-xr-x 2 root root 4096 Jun 27 14:06 ./
drwxr-xr-x 8 root root 4096 Jun 27 13:38 ../
-rw-r--r-- 1 root root 1220 Jun 27 14:04 elasticsearch.gpg
-rw-r--r-- 1 root root  631 Jun 27 14:06 pkgr-zammad.gpg
-rw-r--r-- 1 root root 2794 Mar 26  2021 ubuntu-keyring-2012-cdimage.gpg
-rw-r--r-- 1 root root 1733 Mar 26  2021 ubuntu-keyring-2018-archive.gpg

deb [signed-by=/etc/apt/trusted.gpg.d/pkgr-zammad.gpg] https://dl.packager.io/srv/deb/zammad/zammad/stable/ubuntu 22.04 main

I installed zammad latest version on other Ubuntu 22.04 LTS server. And when I run the restore script there is still this error in result.

Clearing Cache ...
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': libssl.so.1.0.0: cannot open shared object file: No such file or directory - /opt/zammad/vendor/bundle/ruby/3.1.0/gems/openssl-3.1.0/lib/openssl.so (LoadError)
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/openssl-3.1.0/lib/openssl.rb:13:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.3/lib/active_support/key_generator.rb:4:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.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-6.1.7.3/lib/rails/application.rb:6:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.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-6.1.7.3/lib/rails.rb:13:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.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-6.1.7.3/lib/rails/all.rb:5:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/config/application.rb:5:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.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-6.1.7.3/lib/rails/command/actions.rb:22:in `require_application!'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.3/lib/rails/command/actions.rb:14:in `require_application_and_environment!'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.3/lib/rails/commands/runner/runner_command.rb:33:in `perform'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.3/lib/rails/command/base.rb:69:in `perform'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.3/lib/rails/command.rb:48:in `invoke'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.3/lib/rails/commands.rb:18:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.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.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/bin/rails:5:in `<main>'
# Starting Zammad

# Zammad restored successfully - Thu Jun 29 09:43:23 UTC 2023!

But I have this file in this path.

What is the problem here?

Please provide the config file of your backup and restore script.

Config file for restore:

#!/usr/bin/env bash
#
# zammad backup script config
#
# Learn more about the options below at
# https://docs.zammad.org/en/latest/appendix/backup-and-restore/configuration.html

BACKUP_DIR='/var/tmp/zammad_backup'
HOLD_DAYS='10'
DEBUG='no'

Config file for restore:

#!/usr/bin/env bash
#
# zammad backup script config
#
# Learn more about the options below at
# https://docs.zammad.org/en/latest/appendix/backup-and-restore/configuration.html

BACKUP_DIR='/var/tmp/zammad_backup'
HOLD_DAYS='10'
DEBUG='no'

Yep that’s the issue.
The restore script runs a cache clear by default.

But as you’re restoring everything including source files from your old version, the restore will throw an ugly error message at that point. I believe the documentation notes that this is normal in certain scenarious but my mind might play tricks on me.

So all you have to do is follow the documentation:

  • forced reinstall to ensure you have a current Zammad version with fitting source files
  • clean the cache

The second part should not throw any errors.
If it does, old upgrades might have left old files in your file system. Usually package managers warn about that fact and tell you exactly where to find those.

If latter is the case then I’m afraid that’s as far as I can help as fiddling around this may be very time consuming. You can manually compare the current stable branch on github against your up to date /opt/zammad directory. You usually want to look within app only.

1 Like

Thank you for your answer.
That worked. the problem solved .

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