升级到 3.1.0 后文件系统权限问题

我今天从 3.0.x 升级到了 3.1.0。通过 Web UI 更新失败,所以我执行了

git pull
./launcher rebuild app

这顺利完成了,但访问网站时我只收到“无效网关”错误。

我将此追溯到文件系统权限错误:

  • /var/www/discourse/tmp/pids 不可写,修复该问题导致
  • /etc/postgresql/13/main/pg_hba.conf 不可读。

修复这些问题后网站可以工作,但用户头像丢失。再次,一个临时目录丢失了,所以我将容器中的 /var/www/discourse/tmp 设置为全局可写。

这似乎解决了所有我已知的潜在问题,但可能还有更多问题隐藏在暗处。

另外,我在日志中看到了这个:

error running git command: ["git", "rev-parse", "HEAD"] in /var/www/discourse/plugins/styleguide : Discourse::Utils::CommandError : /var/www/discourse/lib/discourse.rb:137:in `exec': fatal: detected dubious ownership in repository at '/var/www/discourse'
To add an exception for this directory, call:

	git config --global --add safe.directory /var/www/discourse

3.1 有什么变化吗?考虑到这是基于 Docker 的,我很惊讶这些问题会出现……到目前为止,我升级后从未遇到过类似的问题。

我遇到了类似的情况——请问您是否运行了任何插件?

我还在通过 docker 进行设置时遇到以下错误。

Discourse::Utils::CommandError: /src/lib/discourse.rb:137:in `exec’: error Command “esbuild” not found。

1 个赞

我怀疑您需要先运行 yarn 来安装依赖项。

2 个赞

我也遇到了类似的问题,运行 yarn 解决了这个问题。

2 个赞

随着最新更新到 3.1.1(我使用 git pull ; ./launcher rebuild app 运行),问题似乎已得到解决,系统运行正常,UI 现在也能正常工作。:tada:

1 个赞

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