Page 1 of 1

intermittent errors of nsclient

Posted: Fri Jun 02, 2017 1:25 pm
by caterpillartce
Hello,

I have a windows host that has been monitored by Nagios since last year. All have been working fine until this week when there are intermittent and random errors of "could not fetch information from server" or "CHECK_NRPE: Error - Could not complete SSL handshake". They seem random in that it does not happen to all the monitoring services and normally fixes itself until a minute later when the error pops up again. It seems to be related to this particular host as all other hosts are working fine.

I checked nsclient.ini and it did not get changed and still has the correct allowed_host;
I checked and there is only one nscp.exe process running in windows task manager;
I restarted nsclient service.

Nothing seems to help so far.

Please help!
Thanks

Re: intermittent errors of nsclient

Posted: Fri Jun 02, 2017 1:38 pm
by tgriep
What version of the NSClient++ is installed on that server?
Can you post the nsclient.log file from the windows server so we can see if there are and errors that can be used to troubleshoot this?
Thanks.

Re: intermittent errors of nsclient

Posted: Fri Jun 02, 2017 1:52 pm
by caterpillartce
version is - NSCP-0.4.4.19-x64
In previous attempt to fix the issue, I deleted the old log and restarted service, so the log is pretty short and clean now. I do not know what 10.60.5.37 is as it is not the Ngaios server and it is not in the allowed_hosts.

2017-06-02 19:06:40: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: The semaphore timeout period has expired: 121
2017-06-02 19:06:51: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:09:15: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:11:39: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: The semaphore timeout period has expired: 121
2017-06-02 19:11:51: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:13:10: error:c:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 10.60.5.37
2017-06-02 19:14:15: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:14:25: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:16:51: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:19:15: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:21:37: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: The semaphore timeout period has expired: 121
2017-06-02 19:21:51: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:23:10: error:c:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 10.60.5.37
2017-06-02 19:24:15: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:26:37: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: The semaphore timeout period has expired: 121
2017-06-02 19:26:51: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:29:15: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:31:32: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: The semaphore timeout period has expired: 121
2017-06-02 19:31:51: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:33:18: error:c:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 10.60.5.37
2017-06-02 19:34:24: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:34:33: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:36:45: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: The semaphore timeout period has expired: 121
2017-06-02 19:36:59: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:39:24: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:41:36: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: The semaphore timeout period has expired: 121
2017-06-02 19:41:59: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:43:18: error:c:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 10.60.5.37
2017-06-02 19:44:23: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:46:59: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37
2017-06-02 19:49:24: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 10.60.5.37

Re: intermittent errors of nsclient

Posted: Fri Jun 02, 2017 2:04 pm
by ssax
This looks to be a windows issue per the NSClient++ dev, see here:

http://forums.nsclient.org/t/socket-err ... red/3281/7

Re: intermittent errors of nsclient

Posted: Fri Jun 02, 2017 2:04 pm
by tgriep
I searched the internet for this error
Failed to establish secure connection: The semaphore timeout period has expired: 121

And most of them are saying that it is a network issue for the Ethernet adapter.
It could be a bad driver, a duplex issue or a speed negotiation issue.
Check the Windows logs to see if there are any HW errors for the network card.
Also, try and update the drivers to see if that helps.