Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jun 2005 16:36:34 -0500
From:      Lane Holcombe <lane@cd-solutions.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: PostgreSQL 8.0.3 + FreeBSD + TCP/IP
Message-ID:  <200506141636.34654.lane@cd-solutions.net>
In-Reply-To: <BED4A4D2.1F4D0%joe@jwebmedia.com>
References:  <BED4A4D2.1F4D0%joe@jwebmedia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 14 June 2005 15:14, Joseph Koenig (jWeb) wrote:
> > On Tue, Jun 14, 2005 at 10:05:05AM -0500, Joseph Koenig (jWeb) wrote:
> >> Hi,
> >>
> >> I'm having a difficulty getting PostgreSQL to accept TCP/IP connections
> >> on FreeBSD 5.3. I have edited 'postgresql.conf' in my postgres data
> >> directory to set the listen_address (and uncommented it) and have the
> >> port line uncommented and set to the default 5432. I then restarted the
> >> postmaster and tried to connect. I get:
> >>
> >> could not connect to server: Connection refused
> >>         Is the server running on host "xx.xxx.xx.xxx" and accepting
> >>         TCP/IP connections on port 5432?
> >>
> >> I can connect from localhost just fine.
> >
> > You need to set listen_addresses, like it says in the comments:
> >
> > listen_addresses = '*'
> >
> > This will allow Postgresql connections from all interfaces.
>
> I have already tried setting the listen_addresses to * and the actual IP.
> Neither of which has worked. I restarted the postmaster both times using
> the script in /usr/local/etc/rc.d/, and by using pg_ctl. Even tried
> starting postmaster with pg_ctl -i. Nothing seems to be working. I have
> double-checked all of my pg_hba.conf settings, even though the error
> doesn't indicate that is the problem at all.
>
> Anyone else have any ideas at all? Thanks,
>
> Joe Koenig
> Production Manager
> jWeb New Media Design
> joe@jWebmedia.com
> http://www.jwebmedia.com/
> 636.928.3162
What do you get when you 

telnet localhost 5432 

verses 

telnet otherserver 5432

?

Try this to rule out any sort of firewall/tunnelling issues

If it "hangs" and you get no prompt, but drops after you type 2 or 3 letters 
then it means postmaster is doing the negotiation (so then you check the 
postmaster log).  

Otherwise you've got gnats in your firewall (or some other kind of bug) to 
deal with.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506141636.34654.lane>