NRPE Socket Timeout when running check that loads PSSNapin f
NRPE Socket Timeout when running check that loads PSSNapin f
We have a Nagios Core server that is showing "CHECK_NRPE: Socket timeout after 30 seconds" on checks that require the Exchange pssnapin to load. The scripts run correctly and quick locally on the Exchange server and other NRPE checks run fine on the server like alias_cpu and alias_disk. The checks that fail on the Exchange server succeed on other Exchange servers. I have copied the script (https://exchange.nagios.org/directory/P ... es/details) and the nsclient.ini file from a working server and still have the issue. The nsclient.log on the server that is not working shows this: "e:c:\build\nscp\include\socket/connection.hpp:146: Failed to send data: The file handle supplied is not valid"
One fix that we have done to get some of the servers to work was to not require "Check for publisher's certificate revocation" in internet options.
The command that I am using on the Nagios server command line to test is: ./check_nrpe -H hostname.domain -c check_queue_health -t 30
The nsclient.ini file has this:
; NSClient server - A simple server that listens for incoming NSClient (check_nt) connection and handles them. Although NRPE is the preferred method NSClient is fully supported and can be used for simplicity or for compatibility.
NSClientServer = 1
; Undocumented section
[/settings/external scripts/scripts]
check_queue_health=cmd /c echo Scripts\QueueHealth.ps1 | PowerShell.exe -Command -
; Undocumented section
[/settings/default]
This is happening on Exchange 2007 SP3 UR 16 servers on Windows 2008 R2 SP1 and Exchange 2013 SP1 UR8 on Server 2012 R2
Any ideas on what else to try?
Thanks
One fix that we have done to get some of the servers to work was to not require "Check for publisher's certificate revocation" in internet options.
The command that I am using on the Nagios server command line to test is: ./check_nrpe -H hostname.domain -c check_queue_health -t 30
The nsclient.ini file has this:
; NSClient server - A simple server that listens for incoming NSClient (check_nt) connection and handles them. Although NRPE is the preferred method NSClient is fully supported and can be used for simplicity or for compatibility.
NSClientServer = 1
; Undocumented section
[/settings/external scripts/scripts]
check_queue_health=cmd /c echo Scripts\QueueHealth.ps1 | PowerShell.exe -Command -
; Undocumented section
[/settings/default]
This is happening on Exchange 2007 SP3 UR 16 servers on Windows 2008 R2 SP1 and Exchange 2013 SP1 UR8 on Server 2012 R2
Any ideas on what else to try?
Thanks
Re: NRPE Socket Timeout when running check that loads PSSNap
In your nsclient.ini file, do you have the NRPE server enabled? Make sure the following is set in the file. If it isn't change it and restart the NSClient++ service.
Code: Select all
NRPEServer = 1
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRPE Socket Timeout when running check that loads PSSNap
Yes, the NRPEServer is enabled:
; NRPE server - A simple server that listens for incoming NRPE connection and handles them.
NRPEServer = 1
And this is set at the bottom of the .ini file:
; Section for NRPE (NRPEListener.dll)
[/settings/NRPE/server]
allow arguments = 1
allow nasty_meta chars = 1
allowed hostes = 10.10.10.10,10.10.10.20
port = 5666
use SSL = 1
Also other ./check_nrpe tests do work on the servers in question
; NRPE server - A simple server that listens for incoming NRPE connection and handles them.
NRPEServer = 1
And this is set at the bottom of the .ini file:
; Section for NRPE (NRPEListener.dll)
[/settings/NRPE/server]
allow arguments = 1
allow nasty_meta chars = 1
allowed hostes = 10.10.10.10,10.10.10.20
port = 5666
use SSL = 1
Also other ./check_nrpe tests do work on the servers in question
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE Socket Timeout when running check that loads PSSNap
On the other servers where this script works, is the NSClient++ service running as a defined user account, instead of "Local System account"?
Also, is the version of NSClient++ the same on both servers?
Also, is the version of NSClient++ the same on both servers?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE Socket Timeout when running check that loads PSSNap
The nsclient service is running as local system on all of the servers and the client is all the same version.
nsclient version 4.1.105
nsclient version 4.1.105
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE Socket Timeout when running check that loads PSSNap
This might generate more helpful information:
From a command prompt:
Wait until it says "Enter command to inject"
Then type:
This should output more information about what is happening.
When done, type:
From a command prompt:
Code: Select all
"C:\Program Files\NSClient++\nscp.exe" test
Then type:
Code: Select all
check_queue_health
When done, type:
Code: Select all
exit
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE Socket Timeout when running check that loads PSSNap
One thing to try is to increase the timeout for your check. Try running the following in the Nagios XI server to see if that resolves the issue.
Could you also post your full nsclient.ini file?
Code: Select all
./check_nrpe -H hostname.domain -c check_queue_health -t 45
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRPE Socket Timeout when running check that loads PSSNap
@box293 the check runs fine on the local machine it just doesn't seem to send the response back to the Nagios server.
Here is what the test output looks like:
d rvice\NSClient++.cpp:616 NSClient++ - 0,4,1,105 2014-04-28 Started!
l ce\simple_client.hpp:32 Enter command to inject or exit to terminate...
check_queue_health
d rvice\NSClient++.cpp:960 Injecting: check_queue_health...
d kExternalScripts.cpp:249 Command line: cmd /c echo Scripts\QueueHealth.ps1 | PowerShell.exe -Command -
d rvice\NSClient++.cpp:985 Result check_queue_health: OK
l ce\simple_client.hpp:80 OK:OK: All mail queues within limits.
exit
Here is what the test output looks like:
d rvice\NSClient++.cpp:616 NSClient++ - 0,4,1,105 2014-04-28 Started!
l ce\simple_client.hpp:32 Enter command to inject or exit to terminate...
check_queue_health
d rvice\NSClient++.cpp:960 Injecting: check_queue_health...
d kExternalScripts.cpp:249 Command line: cmd /c echo Scripts\QueueHealth.ps1 | PowerShell.exe -Command -
d rvice\NSClient++.cpp:985 Result check_queue_health: OK
l ce\simple_client.hpp:80 OK:OK: All mail queues within limits.
exit
Re: NRPE Socket Timeout when running check that loads PSSNap
@tgriep
I have tried to increase the timeout value and I get the same result.
I have tried to increase the timeout value and I get the same result.
Re: NRPE Socket Timeout when running check that loads PSSNap
Here is the nsclient.ini file
- Attachments
-
- nsclient.rtf
- nsclient config file
- (9.35 KiB) Downloaded 380 times