求助一下 今天重构 出BUG了

I, [2024-08-13T05:57:50.936108 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
warning Resolution field "[email protected]" is incompatible with requested version "unset-value@^1.0.0"
warning " > @discourse/[email protected]" has incorrect peer dependency "[email protected]".
warning " > @glint/[email protected]" has unmet peer dependency "@glimmer/component@^1.1.2".
warning " > [email protected]" has unmet peer dependency "xss@*".
warning "workspace-aggregator-34e5186f-b7a2-440b-8456-1e5e2ab3bc1c > discourse > @uppy/[email protected]" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-34e5186f-b7a2-440b-8456-1e5e2ab3bc1c > discourse > @uppy/[email protected]" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-34e5186f-b7a2-440b-8456-1e5e2ab3bc1c > discourse > @uppy/[email protected]" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-34e5186f-b7a2-440b-8456-1e5e2ab3bc1c > discourse-plugins > [email protected]" has unmet peer dependency "ember-source@^3.28.11 || ^4.0.0".
warning "workspace-aggregator-34e5186f-b7a2-440b-8456-1e5e2ab3bc1c > admin > ember-source > [email protected]" has unmet peer dependency "rsvp@^4.8.5".
warning "workspace-aggregator-34e5186f-b7a2-440b-8456-1e5e2ab3bc1c > discourse > @uppy/aws-s3 > @uppy/[email protected]" has incorrect peer dependency "@uppy/core@^3.2.1".
I, [2024-08-13T06:00:55.888060 #1]  INFO -- : yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
$ ./app/assets/javascripts/run-patch-package && rm -rf app/assets/javascripts/node_modules
patch-package 8.0.0
Applying patches...
[email protected][email protected][email protected][email protected] (1 deprecation-name) ✔
[email protected] (2 themes) ✔
[email protected] (3 exclude-strict-mode) ✔
[email protected] ✔
Done in 172.89s.
yarn cache v1.22.22
success Cleared cache.
Done in 11.34s.

I, [2024-08-13T06:00:55.888691 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'
I, [2024-08-13T06:01:32.498780 #1]  INFO -- : Fetching gem metadata from https://rubygems.org/........
Fetching concurrent-ruby 1.3.4
Fetching racc 1.8.1
Fetching public_suffix 6.0.1
Fetching excon 0.111.0
Fetching zeitwerk 2.6.17
Fetching logster 2.20.0
Fetching google-protobuf 4.27.3 (x86_64-linux)
Fetching bootsnap 1.18.4
Fetching oj 3.16.5
Fetching rexml 3.3.4
Fetching faraday-net_http 3.1.1
Fetching highline 3.1.0
Fetching messageformat-wrapper 1.1.0
Fetching mini_scheduler 0.17.0
Fetching irb 1.14.0
Installing racc 1.8.1 with native extensions
Installing public_suffix 6.0.1
Installing faraday-net_http 3.1.1
Installing rexml 3.3.4
Installing excon 0.111.0
Fetching faraday 2.10.1
Installing zeitwerk 2.6.17
Installing messageformat-wrapper 1.1.0
Installing mini_scheduler 0.17.0
Installing bootsnap 1.18.4 with native extensions
Installing concurrent-ruby 1.3.4
Installing irb 1.14.0
Installing faraday 2.10.1
Installing oj 3.16.5 with native extensions
Installing highline 3.1.0
Installing google-protobuf 4.27.3 (x86_64-linux)
Fetching rss 0.3.1
Installing logster 2.20.0
Installing rss 0.3.1
Fetching nokogiri 1.16.7 (x86_64-linux)
Fetching sassc-embedded 1.77.7
Installing sassc-embedded 1.77.7
Installing nokogiri 1.16.7 (x86_64-linux)
Fetching sanitize 6.1.2
Fetching sprockets-rails 3.5.2
Installing sanitize 6.1.2
Installing sprockets-rails 3.5.2
Bundle complete! 142 Gemfile dependencies, 185 gems now installed.
Gems in the groups 'test' and 'development' were not installed.
Bundled gems are installed into `./vendor/bundle`

I, [2024-08-13T06:01:32.499160 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2024-08-13T06:01:37.764526 #1]  INFO -- : discourse-adplugin is already at latest compatible version
discourse-algolia is already at latest compatible version
discourse-animated-avatars is already at latest compatible version
discourse-auto-deactivate is already at latest compatible version
discourse-bilibili-onebox is already at latest compatible version
discourse-cakeday is already at latest compatible version
discourse-click-to-edit is already at latest compatible version
discourse-formatting-toolbar is already at latest compatible version
discourse-gamification is already at latest compatible version
discourse-heti is already at latest compatible version
discourse-microsoft-auth is already at latest compatible version
discourse-multilingual is already at latest compatible version
discourse-post-badges-plugin is already at latest compatible version
discourse-reactions is already at latest compatible version
discourse-solved is already at latest compatible version
discourse-steam-login is already at latest compatible version
discourse-tag-topic-user-device is already at latest compatible version
discourse-whos-online is already at latest compatible version
docker_manager is already at latest compatible version

I, [2024-08-13T06:01:37.765379 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-08-13T06:01:37.772203 #1]  INFO -- : > sleep 10
1376:C 13 Aug 2024 06:01:37.781 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1376:C 13 Aug 2024 06:01:37.781 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=1376, just started
1376:C 13 Aug 2024 06:01:37.781 # Configuration loaded
1376:M 13 Aug 2024 06:01:37.782 * monotonic clock: POSIX clock_gettime
1376:M 13 Aug 2024 06:01:37.782 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
1376:M 13 Aug 2024 06:01:37.782 # Failed listening on port 6379 (TCP), aborting.
I, [2024-08-13T06:01:47.780123 #1]  INFO -- : 
I, [2024-08-13T06:01:47.780610 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
ArgumentError: missing keyword: :coder If no default coder is configured, a coder must be provided to `serialize`. (ArgumentError)

            raise ArgumentError, <<~MSG.squish
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.4/lib/active_record/attribute_methods/serialization.rb:208:in `serialize'
/var/www/discourse/plugins/discourse-multilingual/app/models/multilingual/custom_translation.rb:9:in `<class:CustomTranslation>'
/var/www/discourse/plugins/discourse-multilingual/app/models/multilingual/custom_translation.rb:2:in `<main>'
/var/www/discourse/plugins/discourse-multilingual/plugin.rb:62:in `load'
/var/www/discourse/plugins/discourse-multilingual/plugin.rb:62:in `block (2 levels) in activate!'
/var/www/discourse/plugins/discourse-multilingual/plugin.rb:61:in `each'
/var/www/discourse/plugins/discourse-multilingual/plugin.rb:61:in `block in activate!'
/var/www/discourse/lib/plugin/instance.rb:604:in `block in notify_after_initialize'
/var/www/discourse/lib/plugin/instance.rb:602:in `each'
/var/www/discourse/lib/plugin/instance.rb:602:in `notify_after_initialize'
/var/www/discourse/config/application.rb:244:in `each'
/var/www/discourse/config/application.rb:244:in `block (2 levels) in <class:Application>'
/var/www/discourse/lib/plugin.rb:6:in `initialization_guard'
/var/www/discourse/config/application.rb:244:in `block in <class:Application>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/lazy_load_hooks.rb:94:in `block in execute_hook'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/lazy_load_hooks.rb:87:in `with_execution_control'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/lazy_load_hooks.rb:92:in `execute_hook'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/lazy_load_hooks.rb:78:in `block in run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/lazy_load_hooks.rb:77:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/lazy_load_hooks.rb:77:in `run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.4/lib/rails/application/finisher.rb:93:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.4/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.4/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.4/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.4/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.4/lib/rails/application.rb:426:in `initialize!'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.17/lib/zeitwerk/kernel.rb:34:in `require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.4/lib/rails/application.rb:402:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.4/lib/rails/application.rb:588:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
104:signal-handler (1723528921) Received SIGTERM scheduling shutdown...
I, [2024-08-13T06:02:01.446933 #1]  INFO -- : gem install net-http-persistent -v 4.0.1 -i /var/www/discourse/plugins/discourse-algolia/gems/3.3.3 --no-document --ignore-dependencies --no-user-install
Successfully installed net-http-persistent-4.0.1
1 gem installed
gem install faraday-net_http_persistent -v 2.1.0 -i /var/www/discourse/plugins/discourse-algolia/gems/3.3.3 --no-document --ignore-dependencies --no-user-install
Successfully installed faraday-net_http_persistent-2.1.0
1 gem installed
gem install algolia -v 2.3.0 -i /var/www/discourse/plugins/discourse-algolia/gems/3.3.3 --no-document --ignore-dependencies --no-user-install
Successfully installed algolia-2.3.0
1 gem installed
gem install ruby-openid -v 2.9.2 -i /var/www/discourse/plugins/discourse-steam-login/gems/3.3.3 --no-document --ignore-dependencies --no-user-install
Successfully installed ruby-openid-2.9.2
1 gem installed
gem install rack-openid -v 1.4.2 -i /var/www/discourse/plugins/discourse-steam-login/gems/3.3.3 --no-document --ignore-dependencies --no-user-install
Successfully installed rack-openid-1.4.2
1 gem installed
gem install omniauth-openid -v 2.0.1 -i /var/www/discourse/plugins/discourse-steam-login/gems/3.3.3 --no-document --ignore-dependencies --no-user-install
Successfully installed omniauth-openid-2.0.1
1 gem installed
gem install omniauth-steam -v 1.0.6 -i /var/www/discourse/plugins/discourse-steam-login/gems/3.3.3 --no-document --ignore-dependencies --no-user-install
Successfully installed omniauth-steam-1.0.6
1 gem installed

I, [2024-08-13T06:02:01.447499 #1]  INFO -- : Terminating async processes
I, [2024-08-13T06:02:01.447545 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 36
I, [2024-08-13T06:02:01.447595 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 104
2024-08-13 06:02:01.447 UTC [36] LOG:  received fast shutdown request
2024-08-13 06:02:01.453 UTC [36] LOG:  aborting any active transactions
2024-08-13 06:02:01.458 UTC [36] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2024-08-13 06:02:01.458 UTC [46] LOG:  shutting down
2024-08-13 06:02:01.499 UTC [36] LOG:  database system is shut down
104:M 13 Aug 2024 06:02:01.521 # User requested shutdown...
104:M 13 Aug 2024 06:02:01.521 * Saving the final RDB snapshot before exiting.
104:M 13 Aug 2024 06:02:02.593 * DB saved on disk
104:M 13 Aug 2024 06:02:02.593 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1379 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
e82df7832b6d5879823c52a32451f3560a2c4c425bca613389018202e1339d9f

看报错应该是discourse-multilingual的问题。这个插件我记得不由官方维护,把它卸载掉吧。

看起来像是这个问题。

不是官方的插件还是尽量少安装吧,除非自己非常熟悉。

Discourse 更新太快了,一些插件稍微更新有点不及时就容易把社区搞瘫了。

1 Like

@das-g Thank you very much to fix rebuild issue.

@VegaMonika Are you able to try rebuild passed? (重构后还有问题吗?)

I didn’t fix it, jjaffeux did. :slight_smile:

I just encountered this error in our own Discourse instance, searched for the error message and found this thread, from which I learned which Discourse plugin might be the issue. Looking at GitHub - paviliondev/discourse-multilingual: A Discourse Plugin that makes it easier to administer a Multilingual Forum., I then saw that a fix was already proposed as a Pull Request and thought people here might want to know about that.

1 Like