Re: 7.4Beta1 "failed to create socket: Address family not - Mailing list pgsql-general

From Bruce Momjian
Subject Re: 7.4Beta1 "failed to create socket: Address family not
Date
Msg-id 200308112212.h7BMCmr05900@candle.pha.pa.us
Whole thread Raw
In response to Re: 7.4Beta1 "failed to create socket: Address family not supported by protocol"  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 7.4Beta1 "failed to create socket: Address family not
List pgsql-general
My original commit had a message stating it was an IPv6 and the kernel
didn't support it.  I don't see that message in CVS anymore, but I think
we need something similar.

There was a big discussion over whether we should require IPv6 to be
enabled individually, and then throw a hard error if IPv6 fails, but at
this stage, it seemed best to most to just try IPv6 and soft-fail, while
throwing a message in the server logs.

---------------------------------------------------------------------------

Tom Lane wrote:
> Robert Creager <Robert_Creager@LogicalChaos.org> writes:
> > Aug 10 14:11:27 thunder postgres[18613]: [1-1] LOG:  failed to create
> > socket: Address family not supported by protocol
>
> It's normal for this to happen if you have userland (libc) code that
> supports IPv6 but your kernel isn't configured to do so.  The postmaster
> will try to create both IPv4 and IPv6 sockets, because getaddrinfo()
> told it to, but the IPv6 attempt will fail as above.
>
> However, I can see that this is going to become a FAQ if we leave the
> behavior alone.  I am wondering if we can suppress this message without
> making life difficult for people who are trying to debug actual problems
> in setting up sockets.
>
> We could just ignore EAFNOSUPPORT failures, but I'm not sure if there
> are any cases where such an error would genuinely be interesting.
> Another possibility is to issue the per-failure messages at a very low
> level (DEBUG2 maybe) and only LOG when we can't create any socket at
> all.  Perhaps there are better answers.  Any ideas?
>
>             regards, tom lane
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: Gianni Mariani
Date:
Subject: Re: public key functions for postgresql ?
Next
From: Dennis Gearon
Date:
Subject: Re: PostgreSQL