Thread: PGAdmin will not connect
I feel a little stupid because I know this is the exact same problem I had on my windows box. The problem is, I don't knowhow I fixed it and I can't find the conversation in the archives. Hopefully someone here can help me (again). I have postgreSQL up and running on my slackware linux box. I have pgAdmin III up and running on that same box. I cannotget the two of them talking to one another. I can work on the databases through psql, but when I attempt to connect using pgAdmin, I get an error: --- SNIP --- An error has occured: Error coknnecting to the server: coun not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5423? --- SNIP --- I know that on my windows box, it was a problem with the pg_hba.conf. There was a problem with the configuration there, soI copied the windows pg_hba.conf over to my linux box. No change. Grr... I also tried starting the server with the -i option (which wasn't there originally). That didn't seem to help. I'm not sure what the problem is. If someone has an idea of what I am doing wrong, let me know. I'm willing to start fromscratch if I have to... --- pg_hba.conf --- host all all 127.0.0.1 255.255.255.255 trust local all all trust host all all 127.0.0.1 255.255.255.255 trust host all all 192.168.0.0 255.255.0.0 trust host all all 192.168.0.0 255.255.0.0 trust host all all 127.0.0.1 255.255.255.255 trust --- pg_hba.conf ---
Jeff Cave wrote: > Is the server running on host "127.0.0.1" and accepting > TCP/IP connections on port 5423? >--- SNIP --- > > Is the server accepting TCP/IP connections on port 5432?!? I bet it's not. (tcpip_socket=true in postgresql.conf) Regards, Andreas
No... That wasn't it. tcpip_socket=true port=5423 Rebooted my computer (I know it was probably overkill, but did anyway), and there was no change. Still cannot get pgAdminto connect. Still getting the same error. -----Original Message----- From: Andreas Pflug Sent: Sat 3/6/2004 3:04 AM Jeff Cave Wrote: > Is the server running on host "127.0.0.1" and accepting > TCP/IP connections on port 5423? Is the server accepting TCP/IP connections on port 5432?!? I bet it's not. (tcpip_socket=true in postgresql.conf) Regards, Andreas
what does your pg_hba.conf say about alowing hosts? Is your host allowed to connect to the database? Read your logfile and see if there's something that gives a clue as to why it won't allow the host... Could also have something to do with encryption? is a certain way of encryption required and could it be that pgAdmin does not support it? (would give the bad user/password error, but it's worth the try) If you're not certain where the fault is, try this checklist On the database machine itself: - connect to the database locally (if it's ok, the postmaster is running) - telnet localhost 5432 (do you get a 'connected' status (but otherwise no good info, for telnet is not psql ;-)) the database accepts socket connections) - telnet <your ip> 5432 (same as above, but the postmaster will see you as from your local IP, and not localhost) From the client: - ping <db server> : going OK? Your network is OK - telnet <dbserver> 5432: going OK? You can reach the postmaster, so there's no problems with the database... if all of these tests were succesfull, you should really check your logfile for clues as to what went wrong. A linux / unix way of checking out what's going on: tail -f logfile <try to connect> and see what new lines appear in the log... Hope it helps you on your way... Michiel Jeff Cave wrote: >No... That wasn't it. > >tcpip_socket=true >port=5423 > >Rebooted my computer (I know it was probably overkill, but did anyway), and there was no change. Still cannot get pgAdminto connect. Still getting the same error. > > >-----Original Message----- >From: Andreas Pflug >Sent: Sat 3/6/2004 3:04 AM > >Jeff Cave Wrote: > > >> Is the server running on host "127.0.0.1" and accepting >> TCP/IP connections on port 5423? >> >> > >Is the server accepting TCP/IP connections on port 5432?!? > >I bet it's not. (tcpip_socket=true in postgresql.conf) > >Regards, >Andreas > > >---------------------------(end of broadcast)--------------------------- >TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > > >
Sorry it took so long, but I wanted to check a couple of things and read the manual after the results of this test. I willread the log file when I get off work today, but it looks like I'm not even being given a connection by postmaster. > what does your pg_hba.conf say about alowing hosts? Is your host allowed > to connect to the database? I believe so, here a copy of the relevant lines: --- pg_hba.conf --- local all all trust local all all 127.0.0.1 255.255.255.255 trust host all all 127.0.0.1 255.255.255.255 trust local all all 192.168.0.0 255.255.0.0 trust host all all 192.168.0.0 255.255.0.0 trust --- pg_hba.conf --- I have modified it to allow everything (I think), so long as it is coming from my internal network. > telnet localhost 5432 (do you get a 'connected' status (but otherwise > no good info, for telnet is not psql ;-)) the database accepts socket > connections) BINGO!! That was a hit. It did not allow me to connect. I received an error indicating that I was unable to connect. I checked a couple of things: I have the "-i" option, and the config file has "tcpip_socket=true". Not sure what to checkafter that. -----Original Message----- From: Michiel Lange Sent: Sunday, March 07, 2004 6:11 PM Subject: Re: [pgadmin-support] PGAdmin will not connect what does your pg_hba.conf say about alowing hosts? Is your host allowed to connect to the database? Read your logfile and see if there's something that gives a clue as to why it won't allow the host... Could also have something to do with encryption? is a certain way of encryption required and could it be that pgAdmin does not support it? (would give the bad user/password error, but it's worth the try) If you're not certain where the fault is, try this checklist On the database machine itself: - connect to the database locally (if it's ok, the postmaster is running) - telnet localhost 5432 (do you get a 'connected' status (but otherwise no good info, for telnet is not psql ;-)) the database accepts socket connections) - telnet <your ip> 5432 (same as above, but the postmaster will see you as from your local IP, and not localhost) From the client: - ping <db server> : going OK? Your network is OK - telnet <dbserver> 5432: going OK? You can reach the postmaster, so there's no problems with the database... if all of these tests were succesfull, you should really check your logfile for clues as to what went wrong. A linux / unix way of checking out what's going on: tail -f logfile <try to connect> and see what new lines appear in the log... Hope it helps you on your way... Michiel