PostgreSQL - Connection refused
While setting up a new PostgreSQL server, I noticed that I was getting a connection refused
error while trying to connect to it. After checking the firewall settings and finding everything in order, I decided to check things in the host.
I used ss to inspect connections listening on port 5432 (Default port used by PostgreSQL):
1
2
3
$ ss -tna src :5432
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 127.0.0.1:5432 0.0.0.0:*