升级后网站一直停止

我的网站运行良好已有 18 个月以上。

我注意到它运行在 Debian buster 上,所以升级到了 bullseye 和 Discourse 3.1.0.beta3。

从那时起,我每天早上都发现网站无法访问,并一直在尝试诊断原因。我在日志中看到了很多奇怪的错误:

./launcher logs app 显示了很多:

svlogd: warning: unable to lock directory: /var/log/postgres: temporary failure
svlogd: fatal: no functional log directories.
svlogd: warning: unable to lock directory: /var/log/redis: temporary failure
svlogd: fatal: no functional log directories.

在 /var/log/postgres/current 中我看到:

2023-04-10 10:48:23.733 GMT [6918] LOG:  skipping missing configuration file “/shared/postgres_data/postgresql.auto.conf”
2023-04-10 10:48:23.734 UTC [6918] FATAL:  data directory “/shared/postgres_data” has wrong ownership
2023-04-10 10:48:23.734 UTC [6918] HINT:  The server must be started by the user that owns the data directory.

在 /var/log/redis/current 中:

3787:M 10 Apr 2023 10:49:09.043 * 100 changes in 300 seconds. Saving...
3787:M 10 Apr 2023 10:49:09.044 * Background saving started by pid 7014
7014:C 10 Apr 2023 10:49:09.045 # Failed opening the RDB file dump.rdb (in server root dir /shared/redis_data) for saving: Permission denied
3787:M 10 Apr 2023 10:49:09.144 # Background saving error

/shared/postgres_data 的所有者是 postgres:postgres,redis_data 的所有者是 redis:redis。

我尝试过多次运行 ./launcher rebuild app。

请帮忙!

谢谢

Phil

好的,我找到问题了!

当我最初安装 Discourse 时,我创建了一个“import”容器来从 groups.io 导入消息。我删除了这个容器,并从 containers 文件夹中删除了 yml 文件,从那以后(经过多次重启)它一直运行良好。

Docker 升级中的某些东西似乎重新激活了它,我运行了 docker container list,发现有一个名为 import 的容器!

我从 Docker 中删除了它,并重新启动了 app 容器,一切似乎都正常了。

谢谢

Phil

5 个赞

此主题在上次回复后 30 天自动关闭。不允许回复。