升级到 Failure Discourse 2.8

你好,

我尝试升级到最新发布的版本,但遇到了一些问题。我升级了 docker-manager,并被指示使用 CLI 进行更新。这没关系,偶尔会发生。

在执行 git pull 并运行 ./launcher rebuild app 后,它失败了,我不太确定问题出在哪里。这是我的插件列表和日志。

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-staff-notes.git
          - git clone https://github.com/discourse/discourse-chat-integration.git
          - git clone https://github.com/gdpelican/retort.git
#          - git clone https://github.com/Ebsy/discourse-nationalflags.git
          - git clone https://github.com/angusmcleod/discourse-locations.git
          - git clone https://github.com/discourse/discourse-steam-login.git
          - git clone https://github.com/discourse/discourse-data-explorer.git
          - git clone https://github.com/discourse/discourse-oauth2-basic
          - git clone https://github.com/discourse/discourse-perspective-api.git
          - git clone https://github.com/procourse/procourse-installer.git

日志:

I, [2022-02-26T02:55:14.922993 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
cd /var/www/discourse/plugins && git clone https://github.com/pmusaraj/discourse-jitsi.git
Cloning into 'discourse-jitsi'...
cd /var/www/discourse/plugins && git clone https://github.com/paviliondev/discourse-question-answer.git
Cloning into 'discourse-question-answer'...
cd /var/www/discourse/plugins && git clone https://github.com/critcola/discourse-twitch-onebox.git
Cloning into 'discourse-twitch-onebox'...
cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-akismet.git
Cloning into 'discourse-akismet'...
cd /var/www/discourse/plugins && git clone https://github.com/pmusaraj/discourse-jitsi.git
fatal: destination path 'discourse-jitsi' already exists and is not an empty directory.
Cannot clone directory
cd /var/www/discourse/plugins && git clone https://github.com/paviliondev/discourse-question-answer.git
fatal: destination path 'discourse-question-answer' already exists and is not an empty directory.
Cannot clone directory
cd /var/www/discourse/plugins && git clone https://github.com/critcola/discourse-twitch-onebox.git
fatal: destination path 'discourse-twitch-onebox' already exists and is not an empty directory.
Cannot clone directory
cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-akismet.git
fatal: destination path 'discourse-akismet' already exists and is not an empty directory.
Cannot clone directory
I, [2022-02-26T02:55:40.287227 #1]  INFO -- : gem install geocoder -v 1.4.4 -i /var/www/discourse/plugins/discourse-locations/gems/2.7.5 --no-document --ignore-dependencies --no-user-install
Successfully installed geocoder-1.4.4
1 gem installed
gem install ruby-openid -v 2.9.2 -i /var/www/discourse/plugins/discourse-steam-login/gems/2.7.5 --no-document --ignore-dependencies --no-user-install
Successfully installed ruby-openid-2.9.2
1 gem installed
gem install rack-openid -v 1.3.1 -i /var/www/discourse/plugins/discourse-steam-login/gems/2.7.5 --no-document --ignore-dependencies --no-user-install
Successfully installed rack-openid-1.3.1
1 gem installed
gem install omniauth-openid -v 1.0.1 -i /var/www/discourse/plugins/discourse-steam-login/gems/2.7.5 --no-document --ignore-dependencies --no-user-install
Successfully installed omniauth-openid-1.0.1
1 gem installed
gem install omniauth-steam -v 1.0.6 -i /var/www/discourse/plugins/discourse-steam-login/gems/2.7.5 --no-document --ignore-dependencies --no-user-install
Successfully installed omniauth-steam-1.0.6
1 gem installed

I, [2022-02-26T02:55:40.287755 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile'
** PLUGIN FAILURE **
You are unable to build Discourse due to this error during plugin
initialization:
uninitialized constant Onebox
/var/www/discourse/plugins/discourse-twitch-onebox/plugin.rb:8:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:671:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:671:in `activate!'
lib/discourse.rb:279:in `block in activate_plugins!'
lib/discourse.rb:276:in `each'
lib/discourse.rb:276:in `activate_plugins!'
/var/www/discourse/config/application.rb:324:in `block in <class:Application>'
/var/www/discourse/lib/plugin_initialization_guard.rb:5:in `plugin_initialization_guard'
/var/www/discourse/config/application.rb:323:in `<class:Application>'
/var/www/discourse/config/application.rb:73:in `<module:Discourse>'
/var/www/discourse/config/application.rb:72:in `<top (required)>'
/var/www/discourse/Rakefile:7:in `require'
/var/www/discourse/Rakefile:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:82:in `block in run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/bin/rake:25:in `load'
/var/www/discourse/vendor/bundle/ruby/2.7.0/bin/rake:25:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/cli.rb:484:in `exec'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/cli.rb:31:in `dispatch'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/cli.rb:25:in `start'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/exe/bundle:48:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/exe/bundle:36:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
I, [2022-02-26T02:55:43.858479 #1]  INFO -- :
I, [2022-02-26T02:55:43.859326 #1]  INFO -- : Terminating async processes
I, [2022-02-26T02:55:43.859684 #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: 41
I, [2022-02-26T02:55:43.860155 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 102
2022-02-26 02:55:43.860 UTC [41] LOG:  received fast shutdown request
102:signal-handler (1645844143) Received SIGTERM scheduling shutdown...
2022-02-26 02:55:43.862 UTC [41] LOG:  aborting any active transactions
2022-02-26 02:55:43.865 UTC [41] LOG:  background worker "logical replication launcher" (PID 50) exited with exit code 1
2022-02-26 02:55:43.867 UTC [45] LOG:  shutting down
2022-02-26 02:55:43.889 UTC [41] LOG:  database system is shut down
102:M 26 Feb 2022 02:55:43.896 # User requested shutdown...
102:M 26 Feb 2022 02:55:43.896 * Saving the final RDB snapshot before exiting.
102:M 26 Feb 2022 02:55:43.979 * DB saved on disk
102:M 26 Feb 2022 02:55:43.979 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 608 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
4d132e6fe184252d1944e826993f8ae2528b2d4d6bfb05a5f69a9ff282646cc9
** 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.

您在某处将这些插件(以及更多插件)列出了两次。

2 个赞

我的意思是,自上次安装更新的 discourse 以来,没有任何变化。我确实看到它克隆了两次插件,但不确定为什么会这样。yml 文件(只有一个 app.yml)没有任何重复的引用。

也许移除此插件?

1 个赞

我有一种奇怪的感觉,这并不是一个官方安装,而且您正在查看错误 yml 文件。

您提到的插件不是重建中的插件。

4 个赞

@pfaffman 我认为就是那个原因。我通过 GitHub - procourse/procourse-installer: A Discourse plugin for installing other Discourse plugins. 安装了这个插件,我可能应该停止使用它了,因为它似乎被列在了损坏的插件之下。不过,它确实非常方便,可以在不 SSH 登录服务器、不添加一行代码、不重建和重启整个应用的情况下安装插件。

1 个赞

我认为您应该移除 procourse installer 和 retort(改用 discourse-reactions),因为这两个插件都没有得到最好的维护。它们很有可能在重建时引起问题。

2 个赞

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