Обсуждение: could not bind socket for statistics collector:

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

could not bind socket for statistics collector:

От
"Denis Grannell"
Дата:
Hi,

I have just upgraded to 7.4.1 and since restarting
postmaster I am getting the following error message
in the logfile:
"could not bind socket for statistics collector:
"Cannot assign requested address".
My setup is:

OS :             Solaris 9(sparc)
Postgres Version:    7.4.1 (upgraded from 7.3.2)

The message only started appearing after the
upgrade. It never happened on 7.3.2.
Everything else seems to be working OK, the
database save and restore worked fine between
the versions and all the data seem to be complete.
Accessing the databases using either PHP or JDBC
is all working as it always has.

I read somewhere that, to fix this, all I would
need to do would be to uncomment the line
"::1  localhost" in /etc/inet/ipnodes and restart
the postmaster. However this line is already
uncommented on my system, also I have been using
postgres 7.3.x versions on this exact same system
for well over a year without any errors.

thanks for any assistance,
Denis.

Denis Grannell, Kapuzinerstr. 45, D-80469 Muenchen
Tel:                          ++49 89 201 3672
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Re: could not bind socket for statistics collector:

От
Michael Fuhr
Дата:
On Thu, Jan 01, 2004 at 04:58:39PM +0100, Denis Grannell wrote:
>
> I have just upgraded to 7.4.1 and since restarting
> postmaster I am getting the following error message
> in the logfile:
> "could not bind socket for statistics collector:
> "Cannot assign requested address".
> My setup is:
>
> OS :             Solaris 9(sparc)
> Postgres Version:    7.4.1 (upgraded from 7.3.2)

[snip]

> I read somewhere that, to fix this, all I would
> need to do would be to uncomment the line
> "::1  localhost" in /etc/inet/ipnodes and restart
> the postmaster. However this line is already
> uncommented on my system, also I have been using
> postgres 7.3.x versions on this exact same system
> for well over a year without any errors.

The following message suggests that the solution is to comment, not
uncomment, the "::1 localhost" line in /etc/inet/ipnodes:

http://archives.postgresql.org/pgsql-hackers/2003-11/msg00744.php

I commented out that line on my Solaris 9 box, and the statistics
collector was then able to start.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: could not bind socket for statistics collector:

От
Tom Lane
Дата:
> On Thu, Jan 01, 2004 at 04:58:39PM +0100, Denis Grannell wrote:
>> I have just upgraded to 7.4.1 and since restarting
>> postmaster I am getting the following error message
>> in the logfile:
>> "could not bind socket for statistics collector:
>> "Cannot assign requested address".

Is it actually an ERROR, or just a LOG?  If the latter, ignore it.
There's no problem unless you also see
"LOG: disabling statistics collector for lack of working socket"

Making the message disappear would require getting your kernel and
libc on the same page about whether IPv6 is supported or not.  I don't
know enough about Solaris to know how/where to fix that.

            regards, tom lane

Re: could not bind socket for statistics collector:

От
Michael Fuhr
Дата:
On Thu, Jan 01, 2004 at 01:27:16PM -0500, Tom Lane wrote:
> > On Thu, Jan 01, 2004 at 04:58:39PM +0100, Denis Grannell wrote:
> >> I have just upgraded to 7.4.1 and since restarting
> >> postmaster I am getting the following error message
> >> in the logfile:
> >> "could not bind socket for statistics collector:
> >> "Cannot assign requested address".
>
> Is it actually an ERROR, or just a LOG?  If the latter, ignore it.
> There's no problem unless you also see
> "LOG: disabling statistics collector for lack of working socket"

Dang...I'm not the original poster, but I thought I remembered the
statistics collector not starting when I saw the "could not bind
socket" message.  However, I just backed out the "fix" I mentioned in
my previous post (the fix being to comment out "::1 localhost" from
/etc/inet/ipnodes), and although the "could not bind socket" message is
now logged, the statistics collector nevertheless appears to be running.
Must be a memory fault on my part, unless that behavior changed recently.

> Making the message disappear would require getting your kernel and
> libc on the same page about whether IPv6 is supported or not.  I don't
> know enough about Solaris to know how/where to fix that.

That's what commenting out "::1 localhost" from /etc/inet/ipnodes appears
to do.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: could not bind socket for statistics collector:

От
Tom Lane
Дата:
Michael Fuhr <mike@fuhr.org> writes:
> On Thu, Jan 01, 2004 at 01:27:16PM -0500, Tom Lane wrote:
>> Is it actually an ERROR, or just a LOG?  If the latter, ignore it.
>> There's no problem unless you also see
>> "LOG: disabling statistics collector for lack of working socket"

> Dang...I'm not the original poster, but I thought I remembered the
> statistics collector not starting when I saw the "could not bind
> socket" message.

We did have a problem of that sort in 7.4 beta releases --- pgstats
would give up instead of continuing to try additional results from
getaddrinfo().  I don't recall at the moment if the fix was in 7.4.0
or not, but it's definitely there in 7.4.1.

>> Making the message disappear would require getting your kernel and
>> libc on the same page about whether IPv6 is supported or not.  I don't
>> know enough about Solaris to know how/where to fix that.

> That's what commenting out "::1 localhost" from /etc/inet/ipnodes appears
> to do.

Oh, okay, I misread what you were trying to do.  Yeah, that sounds like
a plausible fix.

            regards, tom lane

Re: could not bind socket for statistics collector:

От
"Denis Grannell"
Дата:
Hi Michael

> >
> > Is it actually an ERROR, or just a LOG?  If the latter, ignore it.
> > There's no problem unless you also see

It's a LOG. I should have mentioned that in my first mail.
So, I'll take your advice and ignore it.

>
> That's what commenting out "::1 localhost" from /etc/inet/ipnodes appears
> to do.

The computer world desperately needs some new phrases to replace
'uncommenting' and 'commenting out'.
Imagine in a converstaion - hup...'scuse me, I wish to uncomment
what you just said!!

Anyway, I have now 'commented out' the offending line in
/etc/inet/ipnodes and the message no longer appears
in the logfile.

Is there a fair probability that other parts of Solaris mightn't
need that line 'commented in', for want of a better phrase?

Thanks a lot for your quick responses,

cheers,
Denis

Re: could not bind socket for statistics collector:

От
"Denis Grannell"
Дата:
Hi Tome
>
> We did have a problem of that sort in 7.4 beta releases --- pgstats
> would give up instead of continuing to try additional results from
> getaddrinfo().  I don't recall at the moment if the fix was in 7.4.0
> or not, but it's definitely there in 7.4.1.

I have also definitely installed 7.4.1. There's no doubt
about that. Here is the header from the Release Notes,
cut and pasted into this mail:

                               Release Notes

                               Release 7.4.1

     Release date: 2003-12-22


cheers,
Denis

Re: could not bind socket for statistics collector:

От
Michael Fuhr
Дата:
On Fri, Jan 02, 2004 at 12:11:54AM +0100, Denis Grannell wrote:
>
> Anyway, I have now 'commented out' the offending line in
> /etc/inet/ipnodes and the message no longer appears
> in the logfile.
>
> Is there a fair probability that other parts of Solaris mightn't
> need that line 'commented in', for want of a better phrase?

Possibly if you're using IPv6, although if you are, then you probably
wouldn't be getting the "could not bind socket" messages and this thread
wouldn't have come up.  If you're concerned about it, then I'd suggest
asking in a Solaris-specific forum such as the comp.unix.solaris newsgroup
or the sun-managers mailing list.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: could not bind socket for statistics collector:

От
"Denis Grannell"
Дата:
Hi Michael,

> > Is there a fair probability that other parts of Solaris mightn't
> > need that line 'commented in', for want of a better phrase?
>
> Possibly if you're using IPv6, although if you are, then you probably
> wouldn't be getting the "could not bind socket" messages and this thread
> wouldn't have come up.  If you're concerned about it, then I'd suggest
> asking in a Solaris-specific forum such as the comp.unix.solaris newsgroup
> or the sun-managers mailing list.

No, I'm not using IPv6 and since you've classified the
message as being harmless then I'm happy with that.
It's the postgres software that's the most important thing
and it appears to be working fine.

cheers,
Denis






Re: could not bind socket for statistics collector:

От
Michael Fuhr
Дата:
On Fri, Jan 02, 2004 at 01:09:51AM +0100, Denis Grannell wrote:
> Hi Michael,
>
> > > Is there a fair probability that other parts of Solaris mightn't
> > > need that line 'commented in', for want of a better phrase?
> >
> > Possibly if you're using IPv6, although if you are, then you probably
> > wouldn't be getting the "could not bind socket" messages and this thread
> > wouldn't have come up.  If you're concerned about it, then I'd suggest
> > asking in a Solaris-specific forum such as the comp.unix.solaris newsgroup
> > or the sun-managers mailing list.
>
> No, I'm not using IPv6 and since you've classified the
> message as being harmless then I'm happy with that.

Give credit (or blame :-) where it's due: Tom Lane said that the message
could be ignored as long as you weren't also seeing "disabling statistics
collector for lack of working socket."

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: could not bind socket for statistics collector:

От
"Denis Grannell"
Дата:
Hi,

> > No, I'm not using IPv6 and since you've classified the
> > message as being harmless then I'm happy with that.
>
> Give credit (or blame :-) where it's due: Tom Lane said that the message
> could be ignored as long as you weren't also seeing "disabling statistics
> collector for lack of working socket."
>

I thought I had already written an appropriate acknowledgement
by CCing the whole list, but I take your point, so:
Let it be known here in this public forum, henceforth and
forevermore, that it was Tom Lane and none other, who
assured me that the message in my logfile was benign. :-)
The call I opened under the subject:
"could not bind socket for statistics collector:", is now
resolved.
Thanks Tom for a speedy and accurate response.

cheers,
Denis