Skip site navigation (1) Skip section navigation (2)

Re: Cannot connect to postgresql

From: Peter Bradley <apvx95(at)dsl(dot)pipex(dot)com>
To: "Adam H(dot)Pendleton" <fmonkey(at)fmonkey(dot)net>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: Cannot connect to postgresql
Date: 2004-07-19 17:17:54
Message-ID: 1090257474.2201.5.camel@linux.local (view raw or flat)
Thread:
Lists: pgadmin-support
On Mon, 2004-07-19 at 11:25, Adam H.Pendleton wrote:
> On Jul 18, 2004, at 4:03 PM, Peter Bradley wrote:
> 
> > netstat -l confirms that the server is listening on port 5432.
> >
> > If I try to telnet to port 5432 I get "Connection refused" both as my
> > own user and as the postgres user.
> 
> If your postgresql server is indeed listening on TCP port 5432, and you 
> issue a telnet command to that port, and get connection refused, then 
> there are three probable reasons you cannot connect:
> 
> 1) Postgresql is listening on a different interface than you are trying 
> to connect to.  IOW, it might be listening on 1.2.3.4:5432, and you're 
> telnetting to 127.0.0.1:5432.  Your netstat command should show what 
> interface it's listening on (ideally, it should be 0.0.0.0:5432, which 
> is all interfaces).
> 
> 2) You've got a firewall installed, blocking port 5432.  A lot of 
> firewalls return RST packets (which is what generates the connection 
> refused message) to incoming connections.  Make sure iptables isn't 
> blocking 5432.
> 
> 3) You made a typo.  :-)
> 
> What is the result of looking at those three items?
> 
> ahp

I made a typo.  :-(

Actually, I failed to pass the -i option to postmaster, which is nearly
as stupid.  Your message above put me on the right track.

Many thanks for all the replies - all of which were helpful and useful. 
I'm just sorry I hadn't paid more attention.  I apologise if anyone
thinks I wasted their time with this.

Cheers

Peter


In response to

Responses

pgadmin-support by date

Next:From: Glenn StroutDate: 2004-07-19 20:38:18
Subject: Status of pgadmin for OSX
Previous:From: Adam H.PendletonDate: 2004-07-19 10:25:12
Subject: Re: Cannot connect to postgresql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group