You haven't restarted PostgreSQL after changing listen_addresses
. It's still listening on 127.0.0.1
, i.e. loopback only. Or you edited the config file for a different PostgreSQL install.
If you connect to host 127.0.0.1
port 5432
it'll work. Or make sure you edited the right config and restart (not just reload) PostgreSQL.