Forums Register Login

Postgresql connection Failure

+Pie Number of slices to send: Send
please can anyone help me. I have the following error messages and i have been troubleshooting it since yesterday without success.


" org.postgresl.util.PSQLEXCEPTION:The connection attempt Failed "
+Pie Number of slices to send: Send
Jonas,
Can you connect to the database through the command line?
+Pie Number of slices to send: Send
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.


Thanks Again


jonas okwara
+Pie Number of slices to send: Send
Jonas,
Can you ping the remote server from the command line? It seems like there might be a firewall issue at work here.
+Pie Number of slices to send: Send
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.


Thanks again

jonas









#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 64.210.231.203 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 64.210.231.203 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 205.130.237.252 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
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1623 times.
Similar Threads
JDBC Exception in JNDI lookup
Rules Roundup not working on Cable Connection
missing expression error
Connection Design
Problem adding JComboBox to JFrame
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:29:45.