[NSClient++] Topic #479 - Socket Errors
http://nsclient.org/nscp/discussion/topic/479
<p>
Socket Errors
</p>
en-usNSClient++/trac/nswide.png
http://nsclient.org/nscp/discussion/topic/479
Trac 1.0beta1 - DiscussionPluginUweWed, 18 Nov 2009 09:11:37 GMTTopic #479 - Socket Errors
http://nsclient.org/nscp/discussion/topic/479#topic
http://nsclient.org/nscp/discussion/topic/479#topic
<p>
What can be done to get a remedy for this error.
</p>
<p>
2009-11-13 11:07:33: error:modules\NSClientListener\NSClientListener.cpp:275: Read on socket failed: recv returned SOCKET_ERROR: 10054: An existing connection was forcibly closed by the remote host.
</p>
<p>
It only appears intermittently on 3 Windows 2003 x86/x64 English Servers out of 20 others which work just fine.
</p>
<p>
I'm using NSClient for years and this are my first problems with it. I'm using the latest NSClient++ Version 0.3.7 , before that i used the previous Version 0.3.6. Perhaps i should downgrade to Version 0.3.5?
</p>
<p>
Greetings, Uwe
</p>
TopicmickemMon, 23 Nov 2009 13:07:13 GMTReply #1509 to topic #479 - Socket Errors
http://nsclient.org/nscp/discussion/message/1509#message1509
http://nsclient.org/nscp/discussion/message/1509#message1509
<p>
There are three timeouts (ish) which are relevant:
</p>
<ol><li>check_nrpe has a -t (IIRC) option for settings the "overall timeout"
</li></ol><ol start="2"><li>NRPEListsner has a timeout option for setting "read timeout"
</li></ol><ol start="3"><li><a class="wiki" href="/nscp/wiki/CheckExternalScripts">CheckExternalScripts</a> has a timeout option for setting "execution timeout"
</li></ol><p>
To explain the various timeouts a bit:
</p>
<ol><li>overall timeout (from check_nrpe) is how long time from the start to stop of the process.
</li></ol><p>
This includes:
</p>
<ul><li>execution of command
</li><li>reading/writing socket data
</li><li>connecting/socket issues
</li></ul><ol start="2"><li>read timeout (from NRPEListsner) sets the time NSCLient++ will wait for a response from the server.
</li></ol><p>
This includes:
</p>
<ul><li>reading/writing socket data
</li></ul><ol start="3"><li>execution timeout (<a class="missing wiki">CheckExternalScript?</a>) is how long time the command will execute.
</li></ol><p>
This includes:
</p>
<ul><li>execution of command
</li></ul><p>
So the "overall timeout" should be the larger then "execution timeout" to allow for network issues along the way. As for the "read timeout" it depends a bit generally it should not have to be very high since "reading" should be fast but if you are "unlucky" all the read-issues might end up here so I would set it to at least "execution timeout" - "overall timeout".
But all in all it is simpler to just set them to something arbitrary like 60 seconds... It is not like something will break if you set them wrong...
</p>
<p>
<em> Michael Medin
</em></p>
MessageUweSun, 22 Nov 2009 12:06:39 GMTReply #1508 to topic #479 - Socket Errors
http://nsclient.org/nscp/discussion/message/1508#message1508
http://nsclient.org/nscp/discussion/message/1508#message1508
<p>
Hello mickem !
</p>
<p>
thank's for your help.
</p>
<p>
This is what i did. I increased the timeout from 30 to 60 and the issue disappered. It's only not clear what relevancy this timeout settings really have on the whole Nagios/NSClient system.
</p>
<p>
Now i hopefully do not have network issues, at least none that i'm aware of.
</p>
<p>
What can you say (do you know) about probable issues coming from this diection?
</p>
MessagemickemThu, 19 Nov 2009 16:01:13 GMTReply #1505 to topic #479 - Socket Errors
http://nsclient.org/nscp/discussion/message/1505#message1505
http://nsclient.org/nscp/discussion/message/1505#message1505
<p>
increasing the timeout should probably solve your problems. But be ware if you need to change the timeouts it might be because you actually have network issues so you might only "Postpone" the problem by increasing them.
</p>
<p>
<em> Michael Medin
</em></p>
MessageUweWed, 18 Nov 2009 13:06:49 GMTReply #1500 to topic #479 - Socket Errors
http://nsclient.org/nscp/discussion/message/1500#message1500
http://nsclient.org/nscp/discussion/message/1500#message1500
<blockquote class="citation">
<p>
What can be done to get a remedy for this error.
</p>
<p>
2009-11-13 11:07:33: error:modules\NSClientListener\NSClientListener.cpp:275: Read on socket failed: recv returned SOCKET_ERROR: 10054: An existing connection was forcibly closed by the remote host.
</p>
<p>
It only appears intermittently on 3 Windows 2003 x86/x64 English Servers out of 20 others which work just fine.
</p>
<p>
I'm using NSClient for years and this are my first problems with it. I'm using the latest NSClient++ Version 0.3.7 , before that i used the previous Version 0.3.6. Perhaps i should downgrade to Version 0.3.5?
</p>
<p>
Greetings, Uwe
</p>
</blockquote>
<p>
I did not realise that the full error message is this:
</p>
<p>
2009-11-18 13:47:00: error:modules\NSClientListener\NSClientListener.cpp:304: Timeout reading NS-client packet (increase socket_timeout).
2009-11-18 13:56:27: error:modules\NSClientListener\NSClientListener.cpp:275: Read on socket failed: recv returned SOCKET_ERROR: 10054: An existing connection was forcibly closed by the remote host.
</p>
<p>
Does it help to increase "socket timeout" and how can i do this?
</p>
Message