Problems: CHECK_NRPE: Socket timeout after 10 seconds.

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.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by psyllex »

I'm having trouble getting NRPE to respond to my Nagios Server. I've been getting the message: CHECK_NRPE: Socket timeout after 10 seconds.

I've added firewall rules for port 5666:

Code: Select all

 iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
   iptables -A FORWARD -p tcp --dport 5666 -m state --state NEW -j ACCEPT
I've made sure the 'only_from' in /etc/xinetd.d is set to my server address. I have also added an argument so that it doesn't use ssl (as I was getting "Couldn't complete SSL handshake" error).

Code: Select all

 server_args = -c /usr/local/nagios/etc/nrpe.cfg -n --inetd
  ..
  ..
  only_from = 127.0.0.1 10.10.0.100 <--(it's an network that is cut off from the actual internet)
I'm not sure if the fact that the switch has been disconnected from the actual internet but I wouldn't think so. It runs like any regular network, except we can't access anything outside our little internal network.
Could someone help me out with this? I really don't know what the problem is.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by slansing »

Can you show us an example of the check you are running? From the command line?
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by psyllex »

Yes here's a the check users that came with the Nagios Plugins (I think):

Code: Select all

define service{
  use                           generic-service
  host_name                server1, server2
  service_description    Current Users
  check_command       check_nrpe!check_users
}
I should note that when I run commands on the terminal on the 'remote' host; the results I get back are fine. example:

Code: Select all

me@myNet:/usr/local/nagios/etc$ /usr/local/nagios/libexec/check_procs -w 150 -c 200
PROCS OK: 105 processes
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by slansing »

I mean, can you show how the command is being run. Take the command you are getting the error from and run it manually from the command line of the Nagios system.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by psyllex »

slansing wrote:I mean, can you show how the command is being run. Take the command you are getting the error from and run it manually from the command line of the Nagios system.
I'm gettting that error on all my commands within Nagios (the interface is lit up in pink with critical statuses). But from the terminal:

Code: Select all

me@myNet:/usr/local/nagios/etc/objects$ /usr/local/nagios/libexec/check_nrpe -H 10.10.0.102
CHECK_NRPE: Socket timeout after 10 seconds.
I hope that is what you're asking for.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by psyllex »

I figured out what was wrong for the most part. It wanted to use ssl. Even though I have it installed on my machine, it wasn't working for whatever reason. So I simply added an:

Code: Select all

-n
to my commands. I have other problems now of course, but at least that got taken care of.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by yancy »

psyllex,

When you compile the plugins you may not have compiled with SSL support

this link has a good explanation of how to compile with SSL support included
http://www.ehow.com/how_7642632_compile ... ption.html

Thanks,

-Yancy
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by psyllex »

yancy wrote:psyllex,

When you compile the plugins you may not have compiled with SSL support

this link has a good explanation of how to compile with SSL support included
http://www.ehow.com/how_7642632_compile ... ption.html

Thanks,

-Yancy
Ok thanks for the info. Now my issue is that it is saying that NRPE: Unable to read output. Do you have any thoughts on that, that may help?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by lmiltchev »

From the official NRPE documentation:
The check_nrpe plugin returns "NRPE: Unable to read output"
This error indicates that the command that was run by the NRPE daemon did not return any character output.
This could be an indication of the following problems:
– An incorrectly defined command line in the command definition. Verify that the command definition in your
NRPE configuration file is correct.
– The plugin that is specified in the command line is malfunctioning. Run the command line manually to make
sure the plugin returns some kind of text output.
What is the check that you are trying to run?
Be sure to check out our Knowledgebase for helpful articles and solutions!
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by psyllex »

I'm sure trying to run check_nrpe!check_procs that comes with the installation of Nagios plugins
Locked