YunoHost-Apps / mastodon_ynh

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

Upgrade to 3.5.3~ynh2 failed #332

Closed linuxissuper closed 2 years ago

linuxissuper commented 2 years ago

Describe the bug

The upgrade actually worked but the services cannot start anymore

Upgrade log: https://linuxistsuper.de/privatebin/?a09868d1687f79fa#EzrtHb9DhqZ6vj4MEZai5SRoFwhN8A7vX99UaKewDVy7

journalctl for mastodon-web.service:
https://linuxistsuper.de/privatebin/?87d6a220d6612dd4#93avbRCa1UYuSCj43QpvAZcJDYQugPLnPwmWsy1cGMVd

Context

linuxissuper commented 2 years ago

Ok, I've fixed it
I set the global ruby version: rbenv global 2.7.2 and then ran gem update --system

I don't have any experience with ruby and just searched the error
and landed here
https://github.com/rubygems/rubygems/issues/3284

drousset commented 2 years ago

Ti, Same problem for me, but this dix did'nt change anything. Mastodon-web rails to start. Any other idea ? Thanks D.

binarydad commented 2 years ago

Having the same issue as well. Same log errors.

isAAAc commented 2 years ago

Ok, I've fixed it I set the global ruby version: rbenv global 2.7.2 and then ran gem update --system

I don't have any experience with ruby and just searched the error and landed here rubygems/rubygems#3284

could we have a patch please ? edit: humm /var/www/mastodon# rbenv global 2.7.2 && gem update --system didn't fix on my server :/

linuxissuper commented 2 years ago

the commands have to be run with sudo
and the sudo user needs /opt/rbenv/bin and /opt/rbenv/shims in his PATH

drousset commented 2 years ago

Hi, PATH checked rbenv and gem update ran without apparent problem mastodon-web still fails to start

Thanks for your help D.

gem update log : root@rousset:/home/admin# gem update --system Installing RubyGems 3.3.5 Successfully built RubyGem Name: bundler Version: 2.3.5 File: bundler-2.3.5.gem Bundler 2.3.5 installed RubyGems 3.3.5 installed Regenerating binstubs Regenerating plugins Parsing documentation for rubygems-3.3.5 Installing ri documentation for rubygems-3.3.5


RubyGems installed the following executables: /opt/rbenv/versions/2.7.2/bin/gem /opt/rbenv/versions/2.7.2/bin/bundle /opt/rbenv/versions/2.7.2/bin/bundler

Ruby Interactive (ri) documentation was installed. ri is kind of like man pages for Ruby libraries. You may access it like this: ri Classname ri Classname.class_method ri Classname#instance_method If you do not wish to install this documentation in the future, use the --no-document flag, or set it as the default in your ~/.gemrc file. See 'gem help env' for details.

RubyGems system software updated

Mastodon-web service restart log :

-- Logs begin at Thu 2022-06-09 12:44:08 CEST, end at Thu 2022-06-09 13:30:55 CEST. -- juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/errors.rb:20:in <module:Bundler>' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/errors.rb:3:in<top (required)>' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler.rb:7:in require_relative' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler.rb:7:in<top (required)>' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/setup.rb:6:in require_relative' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/bundler/setup.rb:6:in<top (required)>' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/config/boot.rb:8:in require' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/config/boot.rb:8:in<top (required)>' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/config/application.rb:1:in require_relative' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/config/application.rb:1:in<top (required)>' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/config/environment.rb:2:in require_relative' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/config/environment.rb:2:in<top (required)>' juin 09 13:30:20 bundle[31338]: from config.ru:4:in require' juin 09 13:30:20 bundle[31338]: from config.ru:4:inblock in

' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in eval' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:innew_from_string' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in load_file' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:inparse_file' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.6.4/lib/puma/configuration.rb:348:in load_rackup' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.6.4/lib/puma/configuration.rb:270:inapp' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.6.4/lib/puma/runner.rb:150:in load_and_bind' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.6.4/lib/puma/cluster.rb:357:inrun' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.6.4/lib/puma/launcher.rb:182:in run' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.6.4/lib/puma/cli.rb:81:inrun' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/gems/puma-5.6.4/bin/puma:10:in <top (required)>' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/bin/puma:25:inload' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/vendor/bundle/ruby/2.7.0/bin/puma:25:in <top (required)>' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:inload' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in kernel_load' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:23:inrun' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/cli.rb:483:in exec' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:inrun' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor.rb:392:indispatch' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/cli.rb:31:in dispatch' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:instart' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/cli.rb:25:in start' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/exe/bundle:48:inblock in <top (required)>' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in with_friendly_errors' juin 09 13:30:20 bundle[31338]: from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/exe/bundle:36:in<top (required)>' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/bin/bundle:3:in load' juin 09 13:30:20 bundle[31338]: from /var/www/mastodon/live/bin/bundle:3:in
' juin 09 13:30:20 systemd[1]: mastodon-web.service: Main process exited, code=exited, status=1/FAILURE juin 09 13:30:20 systemd[1]: mastodon-web.service: Failed with result 'exit-code'. juin 09 13:30:21 systemd[1]: mastodon-web.service: Service RestartSec=100ms expired, scheduling restart. juin 09 13:30:21 systemd[1]: mastodon-web.service: Scheduled restart job, restart counter is at 5. juin 09 13:30:21 systemd[1]: Stopped mastodon-web. juin 09 13:30:21 systemd[1]: mastodon-web.service: Start request repeated too quickly. juin 09 13:30:21 systemd[1]: mastodon-web.service: Failed with result 'exit-code'. juin 09 13:30:21 systemd[1]: Failed to start mastodon-web.

linuxissuper commented 2 years ago

hm maybe you have to run gem update --system for the 2.7.0 version also
but I don't really know, sorry

drousset commented 2 years ago

rbenv global 2.7.0 rbenv: version `2.7.0' not installed

yalh76 commented 2 years ago

Describe the bug

The upgrade actually worked but the services cannot start anymore

Upgrade log: https://linuxistsuper.de/privatebin/?a09868d1687f79fa#EzrtHb9DhqZ6vj4MEZai5SRoFwhN8A7vX99UaKewDVy7

journalctl for mastodon-web.service: https://linuxistsuper.de/privatebin/?87d6a220d6612dd4#93avbRCa1UYuSCj43QpvAZcJDYQugPLnPwmWsy1cGMVd

Context

* Hardware: *VPS bought online *

* YunoHost version:
yunohost:                              
  repo: stable                         
  version: 4.3.6.3                     
yunohost-admin:                        
  repo: testing                        
  version: 4.3.4.1                     
moulinette:                            
  repo: stable                         
  version: 4.3.3.1                     
ssowat:                                
  repo: stable                         
  version: 4.3.3.1                     

From which mastodon_ynh version did you upgrade ? I've tested upgrades from 3.5.2~ynh1 and 3.5.2~ynh1, and mastodon-web service is working.

Maybe you should try another upgrade doing yunohost tools update && yunohost app upgrade mastodon --force

linuxissuper commented 2 years ago

Can I look this up somehow?
I've always had every thing up to date, so I guess 3.5.2?

binarydad commented 2 years ago

In my case, the update was from 3.5.3 ynh1. The upgrade seemed to complete, but the sidekiq and web services failed to start (as mentioned in the initial log file).

Tagadda commented 2 years ago

You can try to upgrade to the #334 branch. I upgraded the ruby version to match the .ruby-version file.

sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/Tagadda-patch-1 --debug -F
drousset commented 2 years ago

Great ! the upgrade to the #334 branch ran fine and the mastodon server is up and running again.

Thanks a lot D.