Thank You jeanne for your response. I already connected to the databse through the unix shell/pgsql interface. I have a java application which connected using the "//localhost/Db" entry in pg_hba.conf. but when I change it to IP Address_of_remote_host/Db, I get the errors i just posted. My troubleshooting effort started with the pg_hba.conf file.
author & internet detective
Jonas, Can you ping the remote server from the command line? It seems like there might be a firewall issue at work here.
Joined: Jun 22, 2004
Thanks Again Jeanne for the reply. This is a test environment i have at home and there is no firewall.
I will post my pg_hba.conf file for your review. I strongly suspect the problem is my settings in the file.
#pg_hba.conf file #========================================================== # Allow any user on the local system to connect to any database under # any user name using Unix-domain sockets (the default for local # connections). # # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD #local all all trust
# The same using local loopback TCP/IP connections. # # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD #host all all 127.0.0.1 255.255.255.255 trust #host all 22.214.171.124 255.0.0.0 trust
# Allow any user from any host with IP address 192.168.93.x to connect # to database "template1" as the same user name that ident reports for # the connection (typically the Unix user name). # # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD host testDB dbAdmin 126.96.36.199 255.0.0.0 trust
# Allow a user from host 192.168.12.10 to connect to database # "template1" if the user's password is correctly supplied. # # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD #host testApp all 188.8.131.52 255.255.255.0 md5
# In the absence of preceding "host" lines, these two lines will # reject all connection from 192.168.54.1 (since that entry will be # matched first), but allow Kerberos V connections from anywhere else # on the Internet. The zero mask means that no bits of the host IP # address are considered so it matches any host. # # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD #host all all 192.168.54.1 255.255.255.255 reject #host all all 0.0.0.0 0.0.0.0 krb5
# Allow users from 192.168.x.x hosts to connect to any database, if # they pass the ident check. If, for example, ident says the user is # "bryanh" and he requests to connect as PostgreSQL user "guest1", the # connection is allowed if there is an entry in pg_ident.conf for map # "omicron" that says "bryanh" is allowed to connect as "guest1". # # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD #host all all 192.168.0.0 255.255.0.0 ident omicron
# If these are the only three lines for local connections, they will # allow local users to connect only to their own databases (databases # with the same name as their user name) except for administrators and # members of group "support" who may connect to all databases. The file # $PGDATA/admins contains a list of user names. Passwords are required in # all cases. # # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD local sameuser all md5 local all @admins md5 local all +support md5
# The last two lines above can be combined into a single line: local all @admins,+support md5
# The database column can also use lists and file names, but not groups: local db1,db2,@demodbs all md5