Page 5 of 5
Re: Check_nrpe socket time out after 10 seconds for windows
Posted: Thu Aug 04, 2016 12:57 pm
by tgriep
Can you post the configuration settings from the Nagios server for the Swap memory usage-CAT C and the Physical memory usage-CAT C so we can view them?
Re: Check_nrpe socket time out after 10 seconds for windows
Posted: Tue Aug 09, 2016 4:56 am
by rohithroki
Hi,
Please check the command definitions of both Physical and swap memory configured in Nagios.
/usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=$ARG1$% MaxCrit=$ARG2$% ShowAll type=physical
/usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=$ARG1$% MaxCrit=$ARG2$% ShowAll type=paged
Re: Check_nrpe socket time out after 10 seconds for windows
Posted: Tue Aug 09, 2016 11:37 am
by tgriep
I don't know is your commands were copied over with some extra characters but the % in those 2 examples have to be removed and that should fix the error you are having.
Re: Check_nrpe socket time out after 10 seconds for windows
Posted: Wed Aug 10, 2016 12:28 am
by rohithroki
yes, i have tried without % as well but still the same error.
[root@infsgdcngos02 libexec]# ./check_nrpe -H $HOSTADDRESS -p 5666 -c CheckMEM -a MaxWarn=80 MaxCrit=90 ShowAll type=physical
CHECK_NRPE: Socket timeout after 10 seconds.
Also i'm getting the same error when executing only with the host address.
[root@infsgdcngos02 libexec]# ./check_nrpe -H $HOSTADDRESS
CHECK_NRPE: Socket timeout after 10 seconds.
And to add on this, i can see the attached error on the server when nsclient is restarted. Also below entries are present in the nsclient log file.
2016-08-04 21:52:33: error:D:\source\nscp\modules\NRPEServer\NRPEServer.cpp:132: CA not found: C:\Program Files\NSClient++/security/ca.pem (generating a default CA)
2016-08-04 21:55:04: error:D:\source\nscp\modules\NRPEServer\NRPEServer.cpp:132: Certificate not found: C:\Program Files\NSClient++/security/certificate.pem (generating a default certificate)
2016-08-07 08:00:23: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 10.234.40.36
Re: Check_nrpe socket time out after 10 seconds for windows
Posted: Wed Aug 10, 2016 9:58 am
by tgriep
The "Rejected connection from: 10.234.40.36" means that you need to add the IP address of the Nagios server to the allowed hosts section in the NSClient++ ini file on that windows system.
After adding the address, restart the NSClient service and that should allow the Nagios system to connect to the Windows host.
Re: Check_nrpe socket time out after 10 seconds for windows
Posted: Thu Aug 11, 2016 1:56 am
by rohithroki
The IP address of the Nagios server is 10.211.26.68 and it is already added in the allowed hosts section of the nsclient configuration file.
This seems a strange address and i have tried adding the same as well. But no luck

Re: Check_nrpe socket time out after 10 seconds for windows
Posted: Thu Aug 11, 2016 9:26 am
by tgriep
Edit your nsclient.ini file and under this section
Change the following from
Code: Select all
ssl options = no-sslv2,no-sslv3
verify mode = peer-cert
to
Also, add the following 2 lines as well in that section
Code: Select all
allow arguments = true
allow nasty characters = true
Save the file and restart NSClient++ and see if that fixes it for you.
Re: Check_nrpe socket time out after 10 seconds for windows
Posted: Fri Aug 19, 2016 12:06 am
by rohithroki
Hi,
A new finding..
We have the exact issue in 3 servers.
1. All 3 servers have IBM Clear Case installed
2. All 3 servers have an extended amount of “CLOSE_WAIT” port 5666 connection status
3. All 3 servers exhibit the same NRPE error in the Windows event logs

- Windows server log.gif (5.61 KiB) Viewed 5306 times
Finally found that all the 3 ClearCase servers are running their own copy of NRPE for Windows which is taking over the NRPE config/port for NSClient++ on these servers.
When we tested by stopping this particular service.. It worked

The issue is, we are not sure if the NRPE windows service have any dependencies which we need to check with our client.
But my question here is NRPE windows is working on port 5667 and the NRPE port configured in NSC.ini file is 5666. Then why there is an overlap??
Please advise on this.
Re: Check_nrpe socket time out after 10 seconds for windows
Posted: Fri Aug 19, 2016 12:01 pm
by lmiltchev
But my question here is NRPE windows is working on port 5667 and the NRPE port configured in NSC.ini file is 5666. Then why there is an overlap??

Port 5667 is used in NSClient++ for passive checks (NSCA).
I am glad your issue has been resolved. Is it all right if we lock this thread?