Обсуждение: LAN connection to server only after restart server

Поиск
Список
Период
Сортировка

LAN connection to server only after restart server

От
Pietro
Дата:
Hi,

I have strange behaviour on my LAN.

Postgresql server is up and running, accepting connection on default port.
Firewall is set well.
Connection from 'localhost' is OK.
Connection from another host on LAN is refused (sniffed with wireshark:
request ACK, response RST, ACK) and so application shows 'Can't connect
to DB server' and dies.

After restart Postgresql server, nota bene _WITHOUT_ changing any bit of
configuration files, all stuff work (connections from localhost and
connections from LAN too)

In /etc/rc5.d/ postgresql server is started after network and after firewall.

It isn't so serious problem for me, only boring one, because each morning
I must start server box and then manually restart posgresql server.

All boxes runs Mandriva 2008.0

Any clue?
Thanks in advance

Pietro



Re: LAN connection to server only after restart server

От
Julio Leyva
Дата:
double check pg_hba.conf






> From: bpietro@simail.it
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] LAN connection to server only after restart server
> Date: Thu, 13 Mar 2008 10:20:07 +0100
>
> Hi,
>
> I have strange behaviour on my LAN.
>
> Postgresql server is up and running, accepting connection on default port.
> Firewall is set well.
> Connection from 'localhost' is OK.
> Connection from another host on LAN is refused (sniffed with wireshark:
> request ACK, response RST, ACK) and so application shows 'Can't connect
> to DB server' and dies.
>
> After restart Postgresql server, nota bene _WITHOUT_ changing any bit of
> configuration files, all stuff work (connections from localhost and
> connections from LAN too)
>
> In /etc/rc5.d/ postgresql server is started after network and after firewall.
>
> It isn't so serious problem for me, only boring one, because each morning
> I must start server box and then manually restart posgresql server.
>
> All boxes runs Mandriva 2008.0
>
> Any clue?
> Thanks in advance
>
> Pietro
>
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin

Re: LAN connection to server only after restart server

От
Tom Lane
Дата:
Pietro <bpietro@simail.it> writes:
> It isn't so serious problem for me, only boring one, because each morning
> I must start server box and then manually restart posgresql server.

There must be something different between what you do manually and what
the init script does ... better take a closer look at that script.

> All boxes runs Mandriva 2008.0

If you were running Red Hat I'd also stop to take a look at the SELinux
configuration, because with RH's default policy there are restrictions
that are enforced against init-started daemons but not against
manually-started programs.  Does Mandriva have/use SELinux?

            regards, tom lane

Re: Resolved - LAN connection to server only after restart server

От
Pietro
Дата:
At Thursday 13 March 2008 16:31:36 Tom Lane wrote:
> Pietro <bpietro@simail.it> writes:
> > It isn't so serious problem for me, only boring one, because each morning
> > I must start server box and then manually restart posgresql server.
>

Problem resolved:

Annoying part of this problem was its intermittent character. Two days all OK,
another one not working until restart, and so on.
Then I discover this line of log: could not bind IPv4 socket.
IMHO it was timing problem. Some days posgresql server was too quick and
tryied binding while network part wasn't wake up yet.
So I added nice 'sleep 10' in postgresql startup script and now all work well.

Regards
Pietro

Re: Resolved - LAN connection to server only after restart server

От
Lew
Дата:
Pietro wrote:
> At Thursday 13 March 2008 16:31:36 Tom Lane wrote:
>> Pietro <bpietro@simail.it> writes:
>>> It isn't so serious problem for me, only boring one, because each morning
>>> I must start server box and then manually restart posgresql server.
>
> Problem resolved:
>
> Annoying part of this problem was its intermittent character. Two days all OK,
> another one not working until restart, and so on.
> Then I discover this line of log: could not bind IPv4 socket.
> IMHO it was timing problem. Some days posgresql server was too quick and
> tryied binding while network part wasn't wake up yet.
> So I added nice 'sleep 10' in postgresql startup script and now all work well.

Thank you so very much, molto grazie, for sharing the solution with us.

--
Lew