Discourse 更新失败,出现 502 Bad Gateway 错误

大家好,

如果有人能帮忙解决我遇到的以下问题,我将不胜感激。

我最近尝试从 2026.6 版本升级到最新版本。

然而,我之前没有看到关于 Postgres 已更新到 18 版本的公告,因此由于磁盘空间不足,更新失败了(我们需要比现有的 25GB 可用空间多 8GB)。

由于我们的站点目前使用的是 v15 版本,我们决定通过修改 app.yml 中的相关行为 templates/postgres.15.template.yml 并保存来推迟此次更新。

随后,在尝试重新构建时失败了,并出现以下错误:

Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/postgresql/15/main/postgresql.conf
Location of failure: /usr/local/lib/ruby/gems/3.4.0/gems/pups-1.4.0/lib/pups/replace_command.rb:11:in 'IO.read'
replace failed with the params {"filename" => "/etc/postgresql/15/main/postgresql.conf", "from" => "data_directory = '/var/lib/postgresql/15/main'", "to" => "data_directory = '/shared/postgres_data'"}
bootstrap failed with exit code 1

在多次故障排除失败,且 Discourse-Doctor 也无法让站点重新运行后,我决定直接恢复在尝试更新前几天所做的 Linode 完整备份,这样会更容易一些。

恢复完成后,我天真地以为站点就能重新正常运行了,但现在我们在尝试访问站点时遇到了 502 Bad Gateway 错误。我看到有建议称重新构建可以解决这个问题,于是我也试了一下,但重新构建再次失败,并再次出现了 bootstrap 错误。

感谢任何可能的帮助或建议。