Re: could not bind IPv4 socket

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Grzegorz Buś <gall(at)p-team(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: could not bind IPv4 socket
Date: 2009-05-01 02:38:10
Message-ID: alpine.GSO.2.01.0904302233450.151@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 30 Apr 2009, Grzegorz Bu? wrote:

> listen_addresses = 'localhost,XXX.XXX.XXX.XXX'
> where XXX.XXX.XXX.XXX is IP address of remote client that I want to be able to use PostgreSQL server. Port is default.

listen_addresses gets set to the IP address of the server itself, the IP
address it is "listening" for input on. Since you're giving it a remote
address, that's why it can't create a socket to listen there.

There is a second file here, pg_hba.conf, that filters down who can
connect to the database. Normal practice here is to set:

listen_address='*'

So that the server is remotely accessible from all of its interfaces, and
then you can do all filtering of who can connect just via pg_hba.conf
instead. See
http://www.postgresql.org/docs/8.3/static/auth-pg-hba-conf.html for more
information.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erick Papadakis 2009-05-01 02:57:37 Re: retrieving primary key for row with MIN function
Previous Message Scott Marlowe 2009-05-01 02:07:34 Re: Understand this error