Tou*_*ick 3 postgresql docker openshift-origin
有时在 OpenShift 中启动 Postgres POD 时会显示以下错误代码
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....LOG: redirecting log output to logging
collector process
HINT: Future log output will appear in directory "pg_log".
..... done
server started
=> sourcing /usr/share/container-scripts/postgresql/start/set_passwords.sh ...
ERROR: tuple concurrently updated
Run Code Online (Sandbox Code Playgroud)
要解决此问题:
oc debug与 Pod的会话。从调试会话的 cmd 行;
run-postgresql。这是CMDdocker 镜像。作为启动过程的一部分,脚本会创建许多文件,否则这些文件在 pod 中将不存在,即/var/lib/pgsql/openshift-custom-postgresql.confand /var/lib/pgsql/passwd,这将阻止您运行任何pg_ctl命令。当您运行该命令时,您应该会看到上面列出的相同错误输出。运行pg_ctl stop -D /var/lib/pgsql/data/userdata以干净地关闭 Postgres。你应该看到;
waiting for server to shut down.... done
server stopped
运行pg_ctl start -D /var/lib/pgsql/data/userdata以启动 Postgres。您应该看到以下输出,它应该无限期地等待(没有错误);
server starting
sh-4.2$ LOG: redirecting log output to logging collector process
HINT: Future log output will appear in directory "pg_log".
按enter几次以返回 cmd 提示符。
运行pg_ctl stop -D /var/lib/pgsql/data/userdata,并等待 postgres 停止。这将确保干净关闭。
waiting for server to shut down.... done
server stopped
退出调试会话。
长时间战斗后找到的解决方案:https : //pathfinder-faq-ocio-pathfinder-prod.pathfinder.gov.bc.ca/DB/PostgresqlCrashLoopTupleError.html 致谢作者:Wade Barnes
| 归档时间: |
|
| 查看次数: |
2033 次 |
| 最近记录: |