在尝试升级我们的 Discourse 实例时,今天需要 git pull,但 ./launcher rebuild 以 FAILED TO BOOTSTRAP 失败,我还没有看到失败的原因。
我们正在 Ubuntu 18.04 上运行 Discourse。到今天的升级之前,一切都运行正常。
我们的 app.yml 文件名为 web.yml,所以我运行了:
# git pull
# ./launcher rebuild web
输出的末尾看起来像这样:
I, [2022-02-18T19:25:46.155360 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
Discourse requires Redis 6.2.0 or up
I, [2022-02-18T19:25:55.644442 #1] INFO -- : gem install sawyer -v 0.8.2 -i /var/www/discourse/plugins/discourse-github/gems/2.7.5 --no-document --ignore-dependencies --no-user-install
Successfully installed sawyer-0.8.2
1 gem installed
gem install octokit -v 4.21.0 -i /var/www/discourse/plugins/discourse-github/gems/2.7.5 --no-document --ignore-dependencies --no-user-install
Successfully installed octokit-4.21.0
1 gem installed
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1121 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"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
85459e34ac2c6275dd1700de2c469124a9fded84800b8c6b4686c1c6b66824e2
** 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.
这是我们当前的插件:
discourse/docker_manager.git
discourse/discourse-github.git
discourse/discourse-solved.git
discourse/discourse-data-explorer.git
discourse/discourse-akismet.git
discourse/discourse-spoiler-alert.git
cpradio/discourse-plugin-replygif.git
discourse/discourse-push-notifications.git
discourse/discourse-chat-integration
当我查看 launcher 输出时,我没有看到导致失败的错误。有什么关于可能导致失败的原因的建议吗?
我尝试回滚 之前的提交 以查看是否能成功重建我们的 web 容器而没有最新的更改,但它仍然因引导失败而失败。![]()
更新:
我们正在使用 单独的容器设置,这显然 不是个好主意,而且我们的数据容器非常老旧,运行的是 Redis v5.0.5(Discourse 目前需要 6.2.0+)。所以,我们重建了数据容器,然后成功重建了 web 容器。在这次经历之后,我们以后可能会放弃多容器方法。
感谢 @pfaffman 提供的非常有帮助的链接!