Answer the question
In order to leave comments, you need to log in
Why does Connection Timeout occur when connecting to remote postgresql?
Good afternoon,
CentOS with postgresql on board is installed on the VPS from reg.ru, it is configured as follows:
netstat -nlp | grep 5432
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 29609/postmaster
tcp 0 0 :::5432 :::* LISTEN 29609/postmaster
unix 2 [ ACC ] STREAM LISTENING 2107633273 29609/postmaster /tmp/.s.PGSQL.5432
psql -h {hostname}
psql: could not connect to server: Connection timed out (0x0000274C/10060). Is the server running on host "{hostname}" (194.58.98.133) and accepting TCP/IP connections on port 5432?
13:30:35.017437 IP {мой IP}.53341 > {hostname}.postgres: Flags [S], seq 4004314466, win 8192, options [mss 1400,nop,wscale 2,nop,nop,sackOK], length 0
13:30:35.017470 IP {hostname}.postgres > {мой IP}.53341: Flags [S.], seq 2431652762, ack 4004314467, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
13:30:36.388395 IP {hostname}.postgres > {мой IP}.53341: Flags [S.], seq 2431652762, ack 4004314467, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
13:30:38.018102 IP {мой IP}.53341 > {hostname}.postgres: Flags [S], seq 4004314466, win 8192, options [mss 1400,nop,wscale 2,nop,nop,sackOK], length 0
Answer the question
In order to leave comments, you need to log in
настроен он следующим образом:
well, it looks like your postgres is only listening to unix socket, not tcp
www.cyberciti.biz/tips/postgres-allow-remote-acces...
Do you have these settings?
In pg_hba.conf
In postgresql.conf
This config should work. If not, then either a firewall or a hoster.
194.58.98.133 IP VPS? Scanned, 5432 does not obey
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question