Search code examples
sqlpostgresqlarcgis

error connection to postgresql


I am trying to connect to PostgreSQL with ArcCatalog. But I do not think that does matter. I can't connect even with pgAdmin. The connection work well on localhost, the problem is only with connection from remote PC.

Every time I am getting error:

Failed to connect to the specified server.
Underlying DBMS error [Fatal: missing or erroneous pg_hba.conf file HINT: See server log for details. 
SQL state:]

I can't understand the reason of this error. I looked at ESRI site and have found there tool named "PostgreSQL DBMS for Windows", but it's available only for arcgis 10.1 and Win x64.

I know that by default PostgreSQL disallow remote connection, so I put to pg_hba.conf next text:

host    all         all         127.0.0.1/32          md5

host    all         all         169.254.231.203          trust

host    all         all     0.0.0.0/0       trust

Solution

  • Please check 169.254.231.203 is valid ip address. You should configure pg_hba.conf for remote accessing your database. I hope these link will help you.

    1. http://www.postgresql.org/docs/devel/static/auth-pg-hba-conf.html
    2. http://www.linuxtopia.org/online_books/database_guides/Practical_PostgreSQL_database/c15679_002.htm