472,119 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

PGAdmin connection to PostgreSQL

PG Admin Version 1.6.0 (Nov 15 2006, rev 5641) Running on Windows 2000
PostgreSQL 8.2.6, running remotely on Linux

pg_hba.conf contains the record ...
host all all 12.345.678.90 255.255.255.255 trust
where 12.345.678.90 is the IP address that I am trying to connect from

Database started with
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -o -i start

None of these settings have changed.


Work undertaken in last 24 hours to create a cron job on the linux machine that completes a pg_dump backup of PostgreSQL and zips it up. A Windows scheduled job then hooks into the Linux machine and performs a get on that file. This seems to be working OK and is as far as I can tell the only thing that has changed. This process did involve a hardware reboot.

Tomcat 5.5 also running on same box, also connecting to database. This connection is still working OK.
Same instance of PGAdmin connects to two other Db instances, one local and one remote on a different server. Both work fine, but PGAdmin can no longer connect to the main remote database.

Message appears in lower left corner "Connecting to database... Failed"
I have turned logging onto Debug and get the following records in the log file for each connection attempt ...

2009-05-19 23:29:22 INFO : Attempting to create a connection object...
2009-05-19 23:29:23 INFO : Creating a connect dialogue
2009-05-19 23:29:24 INFO : Destroying a connect dialogue
2009-05-19 23:29:24 STATUS : Connecting to database...
2009-05-19 23:29:24 INFO : Creating pgConnBase object
2009-05-19 23:29:24 INFO : Server name: 10.987.654.32 (resolved to: 10.987.654.32)
2009-05-19 23:29:24 INFO : Opening connection with connection string: host='10.987.654.32' hostaddr=10.987.654.32 dbname='postgres' user='postgres' port=1234
2009-05-19 23:29:45 STATUS : Connecting to database... (21.03 secs)
2009-05-19 23:29:45 INFO : Destroying pgConnBase object

I can still connect to the Linux Box, I can logon to psql and have attempted to change the password for my postgres user in case that was my problem. It made no difference.


I do appreciate that the symptoms that I am describing suggests that PGAdmin is fine and it is likely to be the Server and or the PostgreSQL instance that is at fault. I am not new to either PostgreSQL or PGAdmin having been a frequent user of both for 3-4 years, however I am at a loss as to what is causing this so any clues would be much appreciated.

If I have missed something off that might help you diagnose, please let me know.

In anticipation, many thanks !!!
May 20 '09 #1
1 124009
I know it has been awhile since this was posted but it might help others having the same problem...

You need to check that the postgresql.conf file parameter, listen_addresses, is set to accept remote connections. It defaults to localhost so change it to '*' so it can listen to for any IP connection or specify a specific IP address.
Nov 5 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Bill J. | last post: by
1 post views Thread by Richard Huxton | last post: by
1 post views Thread by raptor | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.