Page 1 of 3
Problems: CHECK_NRPE: Socket timeout after 10 seconds.
Posted: Mon Feb 18, 2013 4:06 pm
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.
Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.
Posted: Mon Feb 18, 2013 4:26 pm
by slansing
Can you show us an example of the check you are running? From the command line?
Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.
Posted: Mon Feb 18, 2013 5:29 pm
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
Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.
Posted: Mon Feb 18, 2013 5:32 pm
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.
Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.
Posted: Mon Feb 18, 2013 5:42 pm
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.
Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.
Posted: Mon Feb 18, 2013 7:56 pm
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:
to my commands. I have other problems now of course, but at least that got taken care of.
Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.
Posted: Tue Feb 19, 2013 10:01 am
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
Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.
Posted: Tue Feb 19, 2013 1:58 pm
by psyllex
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?
Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.
Posted: Tue Feb 19, 2013 2:40 pm
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?
Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.
Posted: Tue Feb 19, 2013 3:02 pm
by psyllex
I'm sure trying to run check_nrpe!check_procs that comes with the installation of Nagios plugins