Re: 7.4Beta1 "failed to create socket: Address family not supported by protocol"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Creager <Robert_Creager(at)LogicalChaos(dot)org>
Cc: pgsql-general(at)postgreSQL(dot)org, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: 7.4Beta1 "failed to create socket: Address family not supported by protocol"
Date: 2003-08-11 14:21:43
Message-ID: 2153.1060611703@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Robert Creager <Robert_Creager(at)LogicalChaos(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-08-11 14:26:08 Re: Concatenating String Literals in pgsql
Previous Message Tom Lane 2003-08-11 14:11:37 Re: How to prevent vacuum and reindex from deadlocking.