How can I restart a postgres open-access cartridge?

My application crashed because it cannot connect to the postherra DB, and when I try to connect to the database via ssh and psql, I get the following message:

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>?

Running rhc -state application-application:

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

In addition, starting an rhc application doesn’t show anything unusual.

I can’t connect to the above IP_ADDRESS and POST_NUMBER, which looks like the connection between the two transmissions was broken.

Any ideas?

+4
source share
3 answers

I had the same problem. Use pg_ctlinstead of commands rhcfixed for me.

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

:

rhc app restart <app_name>

postgresql:

rhc cartridge restart <cart_type> --app <app_name> 

,

rhc app show <app_name> --gears

""

+1

, , PITA.

, pg_dump psql db .

- , jboss postgresql, , postgres .

() - openshift . , .

0

Source: https://habr.com/ru/post/1534971/


All Articles