Re: could not bind IPv4 socket

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: could not bind IPv4 socket
Дата
Msg-id 200905031314.34555.aklaver@comcast.net
обсуждение исходный текст
Ответ на Re: could not bind IPv4 socket  (Grzegorz Buś <gall@p-team.org>)
Ответы Re: could not bind IPv4 socket  (Grzegorz Buś <gall@p-team.org>)
Список pgsql-general
On Sunday 03 May 2009 12:01:24 pm Grzegorz Buś wrote:
> > 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='*'
>
> OK. My settings now are following:
>
> # cat postgresql.conf | grep listen
> listen_addresses = 'localhost,*'        # what IP address(es) to listen on;
>
> I did restart postgresql service, but problem still persists:
>
> # rm /var/lib/pgsql/data/pgstartup.log
> rm: remove regular file `/var/lib/pgsql/data/pgstartup.log'? y # service
> postgresql restart
> Stopping postgresql service:                               [  OK  ]
> Starting postgresql service:                               [  OK  ]
> # cat /var/lib/pgsql/data/pgstartup.log
> LOG:  could not bind IPv4 socket: Address already in use
> HINT:  Is another postmaster already running on port 5432? If not, wait a
> few seconds and retry.

Did you heed the HINT and see if there is another instance of Postgres running?

>
> Local apps can still connect to the postgresql server - but remote can't.

If it cannot bind to IP socket then no remote connections will not succeed.
Local connections will occur over local Unix socket.

>
> > 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.
>
> I know - after upgrading PostgreSQL from version 7.4 (which allowed remote
> connections) to 8.3 I copied settings from old pg_hba.conf.
>
> --
> Kind Regards,
> Grzegorz Bus



--
Adrian Klaver
aklaver@comcast.net

В списке pgsql-general по дате отправления:

Предыдущее
От: Grzegorz Buś
Дата:
Сообщение: Re: could not bind IPv4 socket
Следующее
От: "Brent Wood"
Дата:
Сообщение: Re: Online Backups PostGre (rsync for Windows)