Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 cluster databases, running on the same host, Ubuntu. My fist database port is set to default but my second database port is set to 5433 in the postgresql.conf file. While everything is ok with local connections, I cannot connect using any of my tools to the second database with port 5433, including pgAdmin. Please help. Any parameter that I need to modify for the new database with port 5433?

netstat -an | grep 5433 shows,

tcp 0 0* LISTEN 
tcp6 0 0 :::5433 :::* LISTEN 
unix 2 [ ACC ] STREAM LISTENING 72842 /var/run/postgresql/.s.PGSQL.5433

iptables -L shows,

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
share|improve this question

migrated from Nov 3 '12 at 15:01

This question came from our site for system and network administrators.

Have you opened access to that port through any firewall (iptables)? Is it definitely listening on that port on an external interface? What does netstat -an | grep 5433 show. – EightBitTony Oct 19 '12 at 8:21
tcp 0 0* LISTEN tcp6 0 0 :::5433 :::* LISTEN unix 2 [ ACC ] STREAM LISTENING 72842 /var/run/postgresql/.s.PGSQL.5433 – user1272305 Oct 19 '12 at 9:49
So, it's listening, you can connect locally - your next check is your firewall. Have you allowed port 5433 through iptables. – EightBitTony Oct 19 '12 at 9:53
no i didn't do that. how can i do this? – user1272305 Oct 19 '12 at 9:56
Post the output of iptables -L and someone who knows iptables better than me can help. Add the output to your question, not in a comment (like I did with your netstat output). – EightBitTony Oct 19 '12 at 9:57

First, please post error messages. Otherwise this is shooting in the dark.

You could have a bunch of problems. I would suggest the following:

  1. If you simply get a connection refused, try netstat -p | grep 5433 so you can see what programs are listening on the port. Is it something unexpected?

  2. If you are getting pg_hba.conf errors, double check your settings there.

  3. Please check again your listen settings in your postgresql.conf file.

  4. Check your postgresql log on the cluster you are having trouble with. Please post relevant sections if this doesn't get you to your answer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.