I'm running pdns_recursor on FreeBSD 6.3-RELEASE, i386 platform.
Suddenly it has stopped working with diagnostics below:
Jul 30 09:09:07 ns pdns_recursor: Exception: Error closing socket: Connection reset by peer
int Utility::closesocket( Utility::sock_t socket )
if(ret < 0)
throw AhuException("Error closing socket: "+stringerror());
It seems to me that remote party sends a TCP RST during the small period of time between last recv() from this TCP socket and closing the socket by pdn_recursor, may be due to timer expired. While there is a very small probability for this scenario, it should be handled properly, especially on busy servers, serving hundreds DNS-queries per second.[[BR]]
There are at least three ways to do it:[[BR]]
Unfortunately, it will be hard to test any workaround applied, because it is very unlikely, that this bug will occur very often. It took something like three months of running pdns_recursor on six DNS-servers 24x7 to catch one :-)
apoelov at mail dot ru
Fixed in cs 1280, thanks!