postgresql - 如何重新启动我的 openshift postgres 墨盒?

标签 postgresql openshift openshift-client-tools

我的应用程序已崩溃,因为它无法连接到 postgres 数据库,当我尝试通过 ssh 和 psql 连接到数据库时,我收到以下消息:

psql: could not connect to server: Connection refused
         Is the server running on host "<GEAR_ID>-<NAMESPACE>.rhcloud.com" (<IP_ADDRESS>) and accepting
         TCP/IP connections on port <PORT_NUMBER>?

运行 rhc app show --state 打印:

Cartridge jbossas-7, haproxy-1.4 is started
Cartridge postgresql-9.2 is started

另外,运行 rhc app show 也没有发现异常。

我无法远程登录到上述 IP_ADDRESS 和 POST_NUMBER,这看起来像是 2 个齿轮之间的通信已中断。

有什么想法吗?

最佳答案

我遇到了同样的问题。使用 pg_ctl 而不是 rhc 命令为我修复了它。

$ rhc ssh <appname>
[...rhcloud.com ...]\> pg_ctl restart
pg_ctl: old server process (PID: 20034) seems to be gone
starting server anyway
server starting

关于postgresql - 如何重新启动我的 openshift postgres 墨盒?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22854578/

相关文章:

postgresql - Openshift:远程公开 postgresql

openshift - 无法git-克隆OpenShift应用程序

postgresql - 使用保存的密码从远程计算机使用 psql 连接到远程 postgres 数据库

sql - 如何防止删除表中的第一行(PostgreSQL)?

tomcat - 如何为 openshift tomcat 制作 servlet?

kubernetes - OpenShift 和 Istio Gateway 流量配置以便使用外部域访问

openshift - 我仍然可以将 rhc port-forward 与 openshift 3 结合使用吗?

windows - Openshift3 中的 "User "系统 "cannot get securitycontextconstraints at the cluster scope"

SQL - 我想不出任何方法来做到这一点,我已经完成了所有研究?

postgresql - plpgsql中的动态变量名(字符串到变量名)