PostgreSQL 8.0.3 + FreeBSD + TCP/IP

Joseph Koenig (jWeb) joe at
Tue Jun 14 20:46:49 GMT 2005

> On Tuesday 14 June 2005 03:14 pm, 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 "" 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 at
>> 636.928.3162
> Have you checked the firewall settings on both computers to ensure that
> port 5432 is open?
> Andrew Gould

I'm guessing that opening the port is part of what placing
"postgresql_enable=YES" in the rc.conf file does, correct? If so, that's
probably the problem as I have not rebooted since adding that. Is there a
way to safely force that to run without rebooting? There is a hardware
firewall in front of the server that I have ensured is allowing that port
through. Thanks,

Joe Koenig
Production Manager
jWeb New Media Design
joe at

More information about the freebsd-questions mailing list