Bugzilla – Bug 545
information on the failed query for error "error: tcp writev: Connection reset by peer"
Last modified: 2014-04-10 16:44:01 CEST
Hello Unbound team,
happy new year 2014!
I have a improvement request:
to provide additional information (source IP of the query, query name, record type, class) on this error message (and similar kind of errors).
Error message today:
"error: tcp writev: Connection reset by peer"
It would greatly help to troubleshooting the issues, esp. on a multi-threaded Unbound install under heavy load.
Happy new year!
It should already print the source IP on the logline after the error:
remote address is <IP>
The query details are not actually available in the piece of code that prints this error, .. We could spend some effort on decoding it and printing the qname, type, class. What verbosity level would you think this should be performed at?
(In reply to comment #1)
> It should already print the source IP on the logline after the error:
> remote address is <IP>
I have two reasons to output error message and IP address in one line:
1) it makes it simpler to 'grep' for the error and have all information in one place
2) in an very busy multithreaded/forked Unbound, there could be other log messages from other threads printed in-between the first log-line (containing the error) and the 2nd (containing the IP), making it hard to correlate the data
> The query details are not actually available in the piece of code that
> prints this error, .. We could spend some effort on decoding it and
> printing the qname, type, class. What verbosity level would you think this
> should be performed at?
I would like it on the same level as the message, which is "ERROR". However the (remote) IP address is the most important piece of information. If decoding the other information will be a performance penalty (even if only in case of an error), it might be a tradeoff not important enough.
Yes decoding would be a performance hit (in case of error). But merging the lines into one report line is likely possible with little performance penalty (but a couple lines of code). I'll look into it.
Best regards, Wouter
Implemented. Not just for writev: but also other error printouts, like read, write, connect...