I am trying to connect from ArcCatalog (version 10.1) to PostgreSQL 9.2. But every time I try to make "Database Connection" I am getting this error:

Failed to connect to the specified server.
Underlying DBMS error[could not connect to server: Connection timed out
   Is the server running on host"x.y.z.w" and accepting TCP/IP connections on port 5432?

PostgreSQL is installed on Centos server (PORT 5432) and I can access it using pgadmin.

Using psql --h X.Y.Z.W -U user -d database on another server I am getting the same error.

here is the content of pg_hba.conf:

 local   all             all                                md5
 # IPv4 local connections:
 host    all             all            X.Y.Z.W/32          md5
 host    all             all             md5
 host    all             all          md5
 # IPv6 local connections:
 host    all             all             ::1/128            md5

Also in postgresql.conf:

Listen_addresses = '*'

in etc/sysconfig/iptables:

  4 :INPUT ACCEPT [0:0]
  6 :OUTPUT ACCEPT [0:0]
  7 :RH-Firewall-1-INPUT - [0:0]
  8 -A INPUT -j RH-Firewall-1-INPUT
  9 -A FORWARD -j RH-Firewall-1-INPUT
 10 -A RH-Firewall-1-INPUT -i lo -j ACCEPT
 11 -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
 12 -A RH-Firewall-1-INPUT -p 50 -j ACCEPT
 13 -A RH-Firewall-1-INPUT -p 51 -j ACCEPT
 14 -A RH-Firewall-1-INPUT -p udp --dport 5353 -d -j ACCEPT
 15 -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
 16 -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
 17 -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
 18 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
 19 -A INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
 20 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
 21 -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
 22 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT

I also put "postgresql-client-libraries" in /bin directory of ArcGIS for Desktop.


1 Answer 1


It is working:

  1. in /etc/sysconfig/iptables: I removed line 21 -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited

2)pg_hba.conf: I only used this: host all all md5


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.