Check_nrpe socket time out after 10 seconds for windows host

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check_nrpe socket time out after 10 seconds for windows

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Check_nrpe socket time out after 10 seconds for windows

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check_nrpe socket time out after 10 seconds for windows

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Check_nrpe socket time out after 10 seconds for windows

Post 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
Attachments
Error screenshot
Error screenshot
WAKR-server error.PNG (3.15 KiB) Viewed 5325 times
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check_nrpe socket time out after 10 seconds for windows

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Check_nrpe socket time out after 10 seconds for windows

Post 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 :(
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check_nrpe socket time out after 10 seconds for windows

Post by tgriep »

Edit your nsclient.ini file and under this section

Code: Select all

[/settings/NRPE/server]
Change the following from

Code: Select all

ssl options = no-sslv2,no-sslv3
verify mode = peer-cert
to

Code: Select all

ssl options = 
verify mode = none
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Check_nrpe socket time out after 10 seconds for windows

Post 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
Connection status.png
3. All 3 servers exhibit the same NRPE error in the Windows event logs
Windows server log.gif
Windows server log.gif (5.61 KiB) Viewed 5305 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.
NRPE windows service.png
When we tested by stopping this particular service.. It worked :D 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?? :roll:

Please advise on this.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check_nrpe socket time out after 10 seconds for windows

Post 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?? :roll:
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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked