#postgres folks, any out-of-the-box thoughts about this error:
psql: error: could not connect to server: could not connect to server: Connection refused
Is the server running on host "10.14.202.76" and accepting
TCP/IP connections on port 9999?
Obviously, the firewall has been checked.
psql: error: could not connect to server: could not connect to server: Connection refused
Is the server running on host "10.14.202.76" and accepting
TCP/IP connections on port 9999?
Obviously, the firewall has been checked.
I don't remember having used postgres ever and I forget everything I ever knew about IT very fast but here go two (maybe silly) ideas: I assume you have checked postgres server logs for errors, so the one I can add is to check if socket file is locked by any other process.
I just remembered another test: Try to telnet/SSH to the IP:Port of postgres server and check if something helpful info comes out.
different port in this case, but the issue is actually with pcp_recovery_node part of pgpool.
[postgres@521 ~]$ pcp_recovery_node -h 10.14.202.76 -p 9898 -U pgpool -n 1
Password:
ERROR: connection to host "10.14.202.76" failed with error "Connection refused"
[postgres@521 data]$ psql -d postgres -h 10.14.202.76 -U pgpool -c "select count from public._test"
count
-------
5
(1 row)
The pgpool docs for anyone curious: https://www.pgpool.net/docs/latest/en/html/index.html
[postgres@521 ~]$ pcp_recovery_node -h 10.14.202.76 -p 9898 -U pgpool -n 1
Password:
ERROR: connection to host "10.14.202.76" failed with error "Connection refused"
[postgres@521 data]$ psql -d postgres -h 10.14.202.76 -U pgpool -c "select count from public._test"
count
-------
5
(1 row)
The pgpool docs for anyone curious: https://www.pgpool.net/docs/latest/en/html/index.html
not SELinux on this one machine:
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: permissive
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 31
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: permissive
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 31
I can only think of this "Solving computer problems 101" solution: https://www.youtube.com/watch?v=rksCTVFtjM4
It won't solve your problem but it will make you laugh. ;-)