YunoHost-Apps / mastodon_ynh

Free, open-source social network for YunoHost
https://joinmastodon.org/
GNU Affero General Public License v3.0
84 stars 34 forks source link

App doesn't work after restore: libicudata.so.65: cannot open shared object file #262

Closed kuba-orlik closed 2 years ago

kuba-orlik commented 3 years ago

Describe the bug

The app doesn't work after restoring it from backup

Context

Steps to reproduce

Expected behavior

The app should run after restore

Logs

bundler: failed to load command: puma (/var/www/mastodon/live/vendor/bundle/ruby/2.7.0/bin/puma)
/var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': libicudata.so.65: 
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_wi
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsn
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:291:in `block in require'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:257:in `load_dependency'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:291:in `require'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/charlock_holmes-0.7.7/lib/charlock_holmes.rb:1:in `<top (required)>'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_wi
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsn
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:66:in `block (2 levels) in require'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:61:in `each'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:61:in `block in require'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:50:in `each'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:50:in `require'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler.rb:173:in `require'
    from /var/www/mastodon/live/config/application.rb:7:in `<top (required)>'
    from /var/www/mastodon/live/config/environment.rb:2:in `require_relative'
    from /var/www/mastodon/live/config/environment.rb:2:in `<top (required)>'
    from config.ru:4:in `require'
    from config.ru:4:in `block in <main>'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.0.4/lib/puma/configuration.rb:331:in `load_rackup'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.0.4/lib/puma/configuration.rb:257:in `app'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.0.4/lib/puma/runner.rb:131:in `load_and_bind'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.0.4/lib/puma/cluster.rb:338:in `run'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.0.4/lib/puma/launcher.rb:171:in `run'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.0.4/lib/puma/cli.rb:80:in `run'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.0.4/bin/puma:10:in `<top (required)>'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/bin/puma:23:in `load'
    from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/bin/puma:23:in `<top (required)>'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:63:in `load'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:63:in `kernel_load'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:28:in `run'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:494:in `exec'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:30:in `dispatch'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:24:in `start'
    from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.14/exe/bundle:49:in `block in <top (required)>'
    from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
    from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.14/exe/bundle:37:in `<top (required)>'
    from /opt/rbenv/versions/mastodon/bin/bundle:23:in `load'
    from /opt/rbenv/versions/mastodon/bin/bundle:23:in `<main>'
mastodon-web.service: Main process exited, code=exited, status=1/FAILURE
mastodon-web.service: Failed with result 'exit-code'.
mastodon-web.service: Service RestartSec=100ms expired, scheduling restart.
mastodon-web.service: Scheduled restart job, restart counter is at 5.
Stopped mastodon-web.
mastodon-web.service: Start request repeated too quickly.
mastodon-web.service: Failed with result 'exit-code'.
Failed to start mastodon-web.

Workaround

After restore, I had to run:

$ cd /var/www/mastodon/live
$ su mastodon -s /bin/bash
$ /opt/rbenv/versions/mastodon/bin/bundle install --redownload
$ ^D
$ systemctl restart mastodon-web

And only then the app started to work, although my timeline is empty.

See also: https://forum.yunohost.org/t/mastodon-cannot-run-libicudata-so-65-missing/14923

fflorent commented 2 years ago

I had the same issue.

Your commands helped me fix that, thanks @kuba-orlik! :pray:

I must confess that I had to exclude the apps/mastodon/backup/var/www/mastodon/live/public/system/cache directory as some borg chunk were corrupted. I don't know if that's related or not to the issue here.

fflorent commented 2 years ago

And only then the app started to work, although my timeline is empty.

To make that work, I had to a sudo systemctl restart mastodon-streaming.

I think I also had to post a message or something to notify the other instances the server was back.