Denis Grannell | 1 Jan 16:58 2004
Picon

could not bind socket for statistics collector:

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.
(Continue reading)

Michael Fuhr | 1 Jan 19:06 2004

Re: could not bind socket for statistics collector:

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.

(Continue reading)

Tom Lane | 1 Jan 19:27 2004
Picon

Re: could not bind socket for statistics collector:

> 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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Michael Fuhr | 1 Jan 19:50 2004

Re: could not bind socket for statistics collector:

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/
(Continue reading)

Tom Lane | 1 Jan 20:10 2004
Picon

Re: could not bind socket for statistics collector:

Michael Fuhr <mike <at> 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

(Continue reading)

Denis Grannell | 2 Jan 00:11 2004
Picon

Re: could not bind socket for statistics collector:

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

(Continue reading)

Denis Grannell | 2 Jan 00:17 2004
Picon

Re: could not bind socket for statistics collector:

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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo <at> postgresql.org so that your
      message can get through to the mailing list cleanly

Michael Fuhr | 2 Jan 00:54 2004

Re: could not bind socket for statistics collector:

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/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Denis Grannell | 2 Jan 01:09 2004
Picon

Re: could not bind socket for statistics collector:

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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo <at> postgresql.org)

Michael Fuhr | 2 Jan 01:29 2004

Re: could not bind socket for statistics collector:

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/

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo <at> postgresql.org)


Gmane