升级失败,提示 FAILED TO BOOTSTRAP

在尝试升级我们的 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 容器而没有最新的更改,但它仍然因引导失败而失败。:confused:

更新:

我们正在使用 单独的容器设置,这显然 不是个好主意,而且我们的数据容器非常老旧,运行的是 Redis v5.0.5(Discourse 目前需要 6.2.0+)。所以,我们重建了数据容器,然后成功重建了 web 容器。在这次经历之后,我们以后可能会放弃多容器方法。

感谢 @pfaffman 提供的非常有帮助的链接!

您正在使用哪个 Redis 版本?

另请参阅 Skip Redis Version Check

啊。我明白了。我们正在运行 discourse_docker链接的 Web 和数据容器,所以 Redis 运行在我们的数据容器中。

在我们的数据容器中:

# redis-server --version
Redis server v=5.0.5

所以,这就解释了。看起来我们需要升级我们的数据容器。这让我更紧张。这个要求是什么时候添加的?也许我可以回滚到之前的 Web 容器版本,直到我的增援部队(在澳大利亚)醒来并可用。 :wink:

哇。查看 git 历史记录,看起来 Redis 版本已经两年没有在 5.x 范围了!但我知道我们在此过程中进行了一些成功的升级(包括 git pull)。

根据 跳过 Redis 版本检查,看起来他们最近才开始强制执行。我已经挖了一个足够大的坑来度过周五,并且不想在没有帮助的情况下尝试升级我们的数据容器……所以,我将尝试回滚到更早版本的 docker_discourse,看看是否能回到一个暂时不强制执行 Redis 要求(直到我们可以更新数据容器)的状态。

1 个赞

这行不通,因为检查来自主存储库。多年来不更新数据容器不是很好,因为在此期间我们多次发布了性能和安全修复程序。

这又是一个我不推荐单独容器设置的原因。

3 个赞

您需要重建数据容器。另请参阅 PostgreSQL 13 更新

2 个赞

感谢。我们正在等待 PostgreSQL 升级。 :slight_smile:

也感谢您提供 PostgreSQL 13 更新技巧的链接。非常有帮助!

2 个赞

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