stats collector "connection refused" on recv of test message

From: Steve Singer <ssinger_pg(at)sympatico(dot)ca>
To: pgsql-hackers(at)postgresql(dot)org
Subject: stats collector "connection refused" on recv of test message
Date: 2010-06-20 16:21:20
Message-ID: BLU0-SMTP9739D081520290D95C2665ACC20@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On one of my machines I get

LOG: could not receive test message on socket for statistics collector: Connection refused

on startup. I noticed this testing 9.0 but when I went back to check I'm
now getting it on 8.3 as well, disabling all of my iptables rules doesn't
help.

I've done some debugging and the recv() call for reading the test message in
pgstat.c is returning -1 with ernno set to 111 (connection refused) as the
log message indicates. The previous calls on PgStatSocket all seemed to
work fine (including the send and select).

If I modify pgstat.c so that it uses pgStatSock for the bind() and receive
but a second socket structure for the connect() and send() everything seems
to work fine (I modify both the send calls for both the 'test' message and
the real stats messages).

Someone else recently reported this error on -admin here
http://archives.postgresql.org/pgsql-admin/2010-04/msg00109.php but the
through sort of stopped.

Is using a single UDP socket structure instance for sending a message to
yourself 'proper'? (it looks like we've been doing this in pgstat.c for
many years without issues reported).

This machine is a 32bit powerpc running Debian linux with kernel 2.6.22 and
glibc 2.7-18 installed. I'm wondering if something was changed in the linux
kernel to break this.

Steve

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2010-06-20 16:32:06 Re: extensible enum types
Previous Message Joshua D. Drake 2010-06-20 16:20:05 Re: beta3 & the open items list