Federated timeline KO after upgrade 3.1.5

Hello
Despite a good number of solved topics for this issue after upgrade I did not find a solution for me:

Mastodon works fine… locally only, it says the version is 3.1.5 as intended. I can send and receive messages from the user on the same instance, we don’t see any toots from outside

I’m on debian buster, up-to-date

I upgraded from 3.1.2 to 3.1.5 and followed each upgrade step but:

  • I wasn’t able to find ruby 2.6.6: 2.6.5 was the last on 2.6 branch, I installed 2.7.0
  • I had some warnings with bundle install and yarn install but they seemed not blocking
  • CPU was very high during these, but no OOM, just unresponsive instance
  • Same during db:migrate
  • I have redis 5.0.3, node v12.18.3

I read someone just installed npm to solve, I can’t for not (packages version are hold, I’m working on it) but I don’t understand why was it working without it before, and if it is requiered I believe someone would have mentioned it in update instructions

Do you have some clues ? Should I upgrade node ? (installed from external repository) => Edit: already on last recommended version

Thanks

You need to have streaming service running (which is node-based) to make federated timeline work.

If I don’t make a mistake, it is already running, mastodon-streaming

● mastodon-streaming.service - mastodon-streaming
Loaded: loaded (/etc/systemd/system/mastodon-streaming.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-07-25 22:12:08 CEST; 5min ago
Main PID: 3176 (node)
Tasks: 18 (limit: 2300)
Memory: 36.7M
CGroup: /system.slice/mastodon-streaming.service
       ├─3176 /usr/bin/node ./streaming
       └─3183 /usr/bin/node /home/mastodon/live/streaming

There seems to be errors on db:migrate I didn’t see them before

RAILS_ENV=production bundle exec rails db:migrate
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy.rb:135: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/type/adapter/object.rb:29: warning: The called method `initialize' is defined here
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/type/mapping.rb:131: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/fields/base.rb:7: warning: The called method `initialize' is defined here
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/fields/base.rb:10: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/fields/base.rb:15: warning: The called method `update_options!' is defined here
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/fields/root.rb:10: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/fields/base.rb:7: warning: The called method `initialize' is defined here
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/fields/base.rb:10: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/fields/root.rb:16: warning: The called method `update_options!' is defined here
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/type/mapping.rb:39: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.1.0/lib/chewy/fields/root.rb:16: warning: The called method `update_options!' is defined here
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.2/lib/active_record/type.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.2/lib/active_record/type/adapter_specific_registry.rb:9: warning: The called method `add_modifier' is defined here
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activemodel-5.2.4.2/lib/active_model/type/integer.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activemodel-5.2.4.2/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb:12: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activemodel-5.2.4.2/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here
rails aborted!
ActiveRecord::DuplicateMigrationNameError: 

Multiple migrations have the name RemoveUnneededIndexes.

/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.2/lib/active_record/migration.rb:1316:in `validate'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.2/lib/active_record/migration.rb:1185:in `initialize'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.2/lib/active_record/migration.rb:1036:in `new'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.2/lib/active_record/migration.rb:1036:in `up'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.2/lib/active_record/migration.rb:1011:in `migrate'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.2/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/strong_migrations-0.6.6/lib/strong_migrations/database_tasks.rb:4:in `migrate'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.2/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <top (required)>'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.2/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.2/lib/rails/command.rb:48:in `invoke'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/railties-5.2.4.2/lib/rails/commands.rb:18:in `<top (required)>'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in `block in require'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

I found a file relative to the error but I absolutely don’t know what I should do with this

mastodon@social.epyisageek.net:~/live/db/migrate $ cat 20200725144904_remove_unneeded_indexes.rb
class RemoveUnneededIndexes < ActiveRecord::Migration[5.2]
  def change
  end
end

It seems to be solved ! :heavy_check_mark:

I uninstalled ruby 2.7.0 (which was in fact not installed ! ‘bundle’ was looking for 2.7.0 dependencies due to .ruby-version file, edited by hand)
I installed 2.6.5 and set .ruby-version file to this version

I renamed the file which caused duplicate 20200725144904_remove_unneeded_indexes.rb to 20200725144904_remove_unneeded_indexes.rb.bak
and run again
bundle install && yarn install
Then db:migrate
Then restarted all mastodon-* services

I still have duplicate indexes as pghero warns, but I’ll have a look later (if you have some advices to fix that harmlessly I’m listening :slight_smile: )

1 Like