[nsd-users] Question on "Connection reset by peer"

A. Schulze sca at andreasschulze.de
Mon Oct 17 18:59:33 UTC 2016


Hello,

I noticed such entries written by nsd to syslog:
    [2016-10-17 07:28:37.865] nsd[5364]: error: failed reading from 193.194.148.20 tcp: Connection reset by peer
    [2016-10-17 07:31:50.317] nsd[7175]: error: failed reading from 58.217.249.156 tcp: Connection reset by peer
    [2016-10-17 07:58:38.359] nsd[9611]: error: failed reading from 217.9.118.2 tcp: Connection reset by peer
    [2016-10-17 07:58:38.378] nsd[9611]: error: failed reading from 217.9.118.2 tcp: Connection reset by peer
    [2016-10-17 08:31:32.789] nsd[13304]: error: failed reading from 211.0.122.74 tcp: Connection reset by peer
    [2016-10-17 08:44:59.044] nsd[13304]: error: failed reading from 198.101.242.72 tcp: Connection reset by peer
    [2016-10-17 10:48:41.613] nsd[14120]: error: failed reading from 193.194.148.20 tcp: Connection reset by peer

For me that looks like connections from random clients that fail to finish a tcp connection for unknown reasons.
But these reasons are far away from being under my control.

There are two positions in nsd-4.1.13/server.c generating these messages:

    #ifdef ECONNRESET
    				if (verbosity >= 2 || errno != ECONNRESET)
    #endif /* ECONNRESET */
                                log_msg(LOG_ERR, "failed reading from %s tcp: %s", buf, strerror(errno));

I checked that my system really define "ECONNRESET" and wonder about the code at all:
    log "Connection reset by peer" if
        - errno is NOT "ECONNRESET"
    or
        - verbosity >= 2 (which happen to be true here)
That sounds strange...

I've no idea about other conditions that trigger such logging but I like to ask if such conditions are always "errors"?
At least in the case shown above that's not an "error" to me as I can do nothing to prevent "Connection reset by peer"

opinions?

Thanks,
Andreas



More information about the nsd-users mailing list