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.
[postgres@521 ~]$ pcp_recovery_node -h 10.14.202.76 -p 9898 -U pgpool -n 1
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"
The pgpool docs for anyone curious: https://www.pgpool.net/docs/latest/en/html/index.html
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