if I run the check_nrpe plugin in stand alone mode, all in ok (i.e. ./check_nrpe -H -c check_load).
But if I run nagios in distribuited monitoring mode, the message that appear in the web interface is "CHECK_NRPE: Error - Could not complete SSL handshake."
Nagios version is 2.2
nrpe version is 2.5.1
nsca version is 2.6
I just verified the “nrpe.cfg”, “/etc/services”, “/etc/hosts.allow” and “/etc/xinetd.d/nrpe” configuration.
Thanks a lot
OK
It was a service configuration imperfection!!
Can you elaborate please? I am having a similar problem
My guess is, he didn’t have his services.cfg file configed correctly. Sure he can run it by hand, but the command defined in checkcommands.cfg and used in services.cfg don’t make sense. So, check both of those and make sure it’s ok. Paste the important parts here for us to tshoot.
My problem is odd, in that everything was working fine. I recently added a check for DHCP and DNS. They were working fine, then later that day I got the handshake error. I get this from BOTH the Nagios server, and if I run the plugin from the remote host.
I found this page, and it really doesn’t pertain to my situation:
nagios.org/faqs/viewfaq.php?faq_id=191
- I have NRPE 2.0 on both machines
- I am 99.9 % sure I am not using SSL support, seeing as I didn’t compile it that way (Also, it just stopped working unexpectedly)
- permissions are 664 , owner nagios user
4.N/A
5.Unless I am reading the nrpe.conf file incorrectly, this is not true. But I have that entry anyway
Most of the nrpe.conf file is supposedly ignored if run under inetd
I also have port 5666 NRPE in /etc/services.
I am stymied as to what the problem is, as this was working just fine, then stopped out of the blue.
If you need to see any files or command outputs, just let me know.
Thanks for reading
Edit: More info
Here is the output when I run the command # /etc/xinetd.d/nagios-nrpe -d -c /etc/nagios/nrpe.cfg
/etc/xinetd.d/nagios-nrpe: line 3: service: command not found
/etc/xinetd.d/nagios-nrpe: line 5: flags: command not found
/etc/xinetd.d/nagios-nrpe: line 6: socket_type: command not found
/etc/xinetd.d/nagios-nrpe: line 7: wait: =': not a pid or valid job spec /etc/xinetd.d/nagios-nrpe: line 7: wait:
no’: not a pid or valid job spec
/etc/xinetd.d/nagios-nrpe: line 8: user: command not found
/etc/xinetd.d/nagios-nrpe: line 9: group: command not found
/etc/xinetd.d/nagios-nrpe: line 10: server: command not found
/etc/xinetd.d/nagios-nrpe: line 11: server_args: command not found
/etc/xinetd.d/nagios-nrpe: line 12: log_on_failure: command not found
disable: Operation failed: client-error-not-found
/etc/xinetd.d/nagios-nrpe: line 14: only_from: command not found
Here is my nagios-nrpe:
default: off
description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
wait = no
user = nobody
group = nogroup
server = /usr/bin/nrpe
server_args = -c /etc/nagios/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 192.168.201.3
}
I have a 2 monitor set up, and sometimes I am intending to type into one screen, but the output goes into the wrong program on the other screen. I am beginning to think (especially since this happened out of the blue) that I put an illegal character in a config file somewhere, as I have done that before. I just don’t know which file it might be… :shock:
EVEN MORE INFO
I had to change permissions on nagios-nrpe to run the above command
/etc/xinetd.d/nagios-nrpe -d -c /etc/nagios/nrpe.cfg
I ran that command on another remote host that is working, and had to change the permissions on that file for that host also
The out put was exactly the same, but that particular host is working fine…
??? :shock:
SOLVED!
I copied nrpe.cfg from the working host to the problem host
I’m sure I had a typo in there somewhere…