[nsd-users] error: failed reading from tcp: Connection reset by peer
Matthijs Mekking
matthijs at NLnetLabs.nl
Mon May 19 08:15:20 UTC 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Shane,
Thank you for remark. We fixed it in the trunk version. It now only logs
the message when errno != ECONNRESET or when the verbosity level is 2 or
higher.
Regards,
Matthijs Mekking
matthijs at nlnetlabs.nl
Foundation NLnet Labs
Shane Kerr wrote:
> All,
>
> I see the following message fairly frequently in our nsd.log files:
>
> error: failed reading from tcp: Connection reset by peer
>
> A quick grep through the source code reveals that this log message comes
> from server.c, and can come pretty much at any time during a TCP query.
>
> Since:
>
> - This condition occurs during normal operation, and
> - There is nothing a server operator can do about it.
>
> I suggest that it should not be in the logs. All it does is make server
> operators confused and nervous (at least, it made me confused and
> nervous when I saw these messages).
>
> I've included a very short patch to NSD that seems to do the trick.
>
> --
> Shane
>
> --- server.c.orig 2008-05-16 10:20:25.000000000 +0200
> +++ server.c 2008-05-16 10:21:44.000000000 +0200
> @@ -1394,7 +1394,9 @@
> */
> return;
> } else {
> - log_msg(LOG_ERR, "failed reading from tcp: %s", strerror(errno));
> + if (errno != ECONNRESET) {
> + log_msg(LOG_ERR, "failed reading from tcp: %s", strerror(errno));
> + }
> cleanup_tcp_handler(netio, handler);
> return;
> }
> @@ -1454,7 +1456,9 @@
> */
> return;
> } else {
> - log_msg(LOG_ERR, "failed reading from tcp: %s", strerror(errno));
> + if (errno != ECONNRESET) {
> + log_msg(LOG_ERR, "failed reading from tcp: %s", strerror(errno));
> + }
> cleanup_tcp_handler(netio, handler);
> return;
> }
>
>
> _______________________________________________
> nsd-users mailing list
> nsd-users at NLnetLabs.nl
> http://open.nlnetlabs.nl/mailman/listinfo/nsd-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIMTcYIXqNzxRs6egRAtDjAJ41cdEA8mE9KrsP5zah/FBrHsazegCfdv6O
kJDkuwbj0NMQn6o161Q33CI=
=3S9U
-----END PGP SIGNATURE-----
More information about the nsd-users
mailing list