NSClient++ Help (#1) - Socket Errors (#479) - Message List

Socket Errors

What can be done to get a remedy for this error.

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.

It only appears intermittently on 3 Windows 2003 x86/x64 English Servers out of 20 others which work just fine.

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?

Greetings, Uwe

  • Message #1500

    What can be done to get a remedy for this error.

    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.

    It only appears intermittently on 3 Windows 2003 x86/x64 English Servers out of 20 others which work just fine.

    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?

    Greetings, Uwe

    I did not realise that the full error message is this:

    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.

    Does it help to increase "socket timeout" and how can i do this?

    • Message #1505

      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.

      Michael Medin

      • Message #1508

        Hello mickem !

        thank's for your help.

        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.

        Now i hopefully do not have network issues, at least none that i'm aware of.

        What can you say (do you know) about probable issues coming from this diection?

        • Message #1509

          There are three timeouts (ish) which are relevant:

          1. check_nrpe has a -t (IIRC) option for settings the "overall timeout"
          1. NRPEListsner has a timeout option for setting "read timeout"
          1. CheckExternalScripts has a timeout option for setting "execution timeout"

          To explain the various timeouts a bit:

          1. overall timeout (from check_nrpe) is how long time from the start to stop of the process.

          This includes:

          • execution of command
          • reading/writing socket data
          • connecting/socket issues
          1. read timeout (from NRPEListsner) sets the time NSCLient++ will wait for a response from the server.

          This includes:

          • reading/writing socket data
          1. execution timeout (CheckExternalScript?) is how long time the command will execute.

          This includes:

          • execution of command

          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...

          Michael Medin

Subscriptions