你好,我试图将 Discourse 更新到最新版本。
FAILED
--------------------
Pups::ExecError: /root/upgrade_postgres 执行失败,返回状态为 #<Process::Status: pid 45 exit 1>
失败位置:/pups/lib/pups/exec_command.rb:112:in `spawn'
执行失败,参数为 "/root/upgrade_postgres"
1cafe54cd6661316d8e9e393c54f73ab89bc3f5e70e104f6c5e4f8794053c09c
** 启动失败 ** 请向上滚动查看之前的错误信息,可能不止一条。
./discourse-doctor 可能有助于诊断问题。
另外:
成功。现在可以使用以下命令启动数据库服务器:
pg_ctlcluster 10 main start
警告:选定的 stats_temp_directory /var/run/postgresql/10-main.pg_stat_tmp
对集群所有者不可写。因此未将其添加到
postgresql.conf 中。
Ver Cluster Port Status Owner Data directory Log file
10 main 5433 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
update-alternatives: 警告:由于链接组 postmaster.1.gz 已损坏,强制重新安装替代项 /usr/share/postgresql/12/man/man1/postmaster.1.gz
invoke-rc.d: 无法确定当前运行级别
invoke-rc.d: policy-rc.d 拒绝了启动操作。
正在处理 postgresql-common (213.pgdg100+1) 的触发器...
从已安装的 myspell/hunspell 包构建 PostgreSQL 词典...
删除过时的词典文件:
正在停止 PostgreSQL 10 数据库服务器:main。
正在停止 PostgreSQL 12 数据库服务器:main。
执行一致性检查
-----------------------------
检查集群版本 正常
源集群未正常关闭。
失败,正在退出
tail -f shared/standalone/log/var-log/postgres/current 命令的输出:
2020-06-14 01:37:02.155 UTC [3508] FATAL: 数据目录 "/shared/postgres_data" 的权限归属错误
2020-06-14 01:37:02.155 UTC [3508] HINT: 服务器必须由拥有数据目录的用户启动。
推迟更新
如果您需要在下次重建时推迟更新,可以在 app.yml 文件中将
"templates/postgres.template.yml"更改为"templates/postgres.10.template.yml",以替换 PostgreSQL 模板。不建议这样做,因为一些站点管理员可能会忘记在之后恢复此更改。
我已应用此更改,Discourse 论坛现已在线。接下来我们该怎么做? 目前,我使用的是 “templates/postgres.10.template.yml”。