Re: [BUGS] Ident authentication fails due to bind error on server (8.4.8)

2011-06-28 Thread Marinos Yannikos
On Sat, 18 Jun 2011 04:55:59 +0200, Marinos Yannikos m...@geizhals.at wrote: sysctl -w net.ipv4.tcp_tw_reuse=1 This fixed the issue apparently, so bind() seems to choose ports in TIME_WAIT state for some reason with sin_port=0 and that caused it. Regards, Marinos -- Sent via

[BUGS] Ident authentication fails due to bind error on server (8.4.8)

2011-06-17 Thread Marinos Yannikos
Hi, I'm not sure that this is not a configuration or networking issue (so apologies if it is), but we seem to be getting rare (a few times/day) failures with ident authentication because several clients attempt to do it simultaneously over a high-latency connection (capitalized = edited

Re: [BUGS] Ident authentication fails due to bind error on server (8.4.8)

2011-06-17 Thread Tom Lane
Marinos Yannikos m...@geizhals.at writes: I'm not sure that this is not a configuration or networking issue (so apologies if it is), but we seem to be getting rare (a few times/day) failures with ident authentication because several clients attempt to do it simultaneously over a

Re: [BUGS] Ident authentication fails due to bind error on server (8.4.8)

2011-06-17 Thread Tom Lane
I wrote: I don't think it's a race condition per se. The code ought to be setting up the address argument for bind() with sin_port = 0 so that an unused port number gets assigned. That seems to be what happens on a couple of machines that I tried here, but I notice that the Linux manpage

Re: [BUGS] Ident authentication fails due to bind error on server (8.4.8)

2011-06-17 Thread Marinos Yannikos
On Fri, 17 Jun 2011 19:51:59 +0200, Tom Lane t...@sss.pgh.pa.us wrote: I looked at the glibc source code for getaddrinfo, and it looks like they do reliably set sin_port to zero when no service argument is provided, despite the above documentation statement. So that's why it works for me. But