Page 2 of 4

Re: CHECK_NRPE: Error receiving data from daemon

Posted: Fri May 16, 2014 3:01 pm
by cshaffer
/usr/local/nagios/libexec/check_nrpe -H 10.206.201.25
This returned NRPE v2.12

Changed the nrpe.cfg to use one argument with check_disk.

Restarted xinetd

Logged on as user nagios

[nagios@trans4m ~]$ pwd
/home/nagios
[nagios@trans4m ~]$ whoami
nagios

Ran the command and got.
'nagios@trans4m ~]$ check_nrpe -H localhost -c check_disk -a '-w 20% -c 10% -p /
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

Re: CHECK_NRPE: Error receiving data from daemon

Posted: Fri May 16, 2014 6:09 pm
by Box293
Not sure if this is a typo but you used localhost for the -H argument.

Your command from the Nagios server be:

Code: Select all

check_nrpe -H 10.206.201.25 -c check_disk -a '-w 20% -c 10% -p /

Re: CHECK_NRPE: Error receiving data from daemon

Posted: Mon May 19, 2014 8:08 am
by cshaffer
On the server I ran this:
/usr/lical/nagios/libexec/check_nrpe -H 10.206.201.25 -c check_disk -a '-w 20% -c 10% -p /'

Received error
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

The /var/log/messages error was Error: Could not complete SSL handshake. 1

This is the same as my original post.

Re: CHECK_NRPE: Error receiving data from daemon

Posted: Mon May 19, 2014 11:10 am
by lmiltchev
cshaffer,

Can you try reinstalling the agent and see if this is going to fix the issue?

Also, is there a chance for you to test this on el5 in your environment (maybe spin a VM and try installing the linux agent on it)?

Re: CHECK_NRPE: Error receiving data from daemon

Posted: Mon May 19, 2014 11:10 am
by slansing
Immediately after running that command from nagios, run the following on the remote host and share the output please:

Code: Select all

tail -50 /var/log/messages
Hopefully this will show us the issue. Also, please make sure that your commands as you post them here, and your output, are free of typo's as we will need to verify every time (unless it is obvious) if you actually typed the command correctly. Thanks!

Re: CHECK_NRPE: Error receiving data from daemon

Posted: Mon May 19, 2014 11:28 am
by cshaffer
We do not have an RHEL5 host to test on. The tail command is how I have been finding the error message "Error: Could not complete SSL handshake. 1" from the beginning. This error is consistently the problem. In every test, even when the error message returned by the check_nrpe command varies, the system log has "Error: Could not complete SSL handshake. 1" in it. It happens whether I am testing from the server or the client. I will reinstall the agent and try again. I think I have done this already, but I will do it again to make sure.

Re: CHECK_NRPE: Error receiving data from daemon

Posted: Mon May 19, 2014 12:04 pm
by abrist
Are you reinstalling the agent from the XI agent tarball?

Re: CHECK_NRPE: Error receiving data from daemon

Posted: Mon May 19, 2014 1:14 pm
by cshaffer
Yes. I used linux-nrpe-agent-el4.tar.gz. I notice that I have installed it four times. There are four logs-all-steps-#############.tar.gz files. I extracted the newest one and all of the logs say that it appears to have already completed successfully, except for the A-subcomponents.log.

I examined the log and may have found the problem. I installed the libmcrypt rpm libmcrypt-2.5.7-1.2.el4.rf.i386.rpm. It said it installed successfully, but I found errors in the A-subcomponents log.

The mcrypt library could not be located on your system. This
means that you will NOT be able to use any crypto algorithms
in the NSCA client or daemon.

Could this be what is causing nrpe to fail?

Re: CHECK_NRPE: Error receiving data from daemon

Posted: Mon May 19, 2014 2:06 pm
by cshaffer
I would like to close this topic. The system I am working on is used by 2 manufacturing facilities 24/7. The more I dig into this, the more I am seeing that this might require a lot of updating and I can't risk disrupting the business. We push $2 million a day out the door and disruptions get expensive fast. FYI. I am starting to think that the SSL problem is independent of the nagios software. If I can get it resolved, I will retry nagios at some time in the future. Thanks for you r help.

Re: CHECK_NRPE: Error receiving data from daemon

Posted: Mon May 19, 2014 2:11 pm
by sreinhardt
Not being able to find libmcrypt will absolutely cause an issue. I'm sure ./configure could be run manually to pass the correct location, or you can run nrpe without ssl if you really wanted. A third option would be to use check_by_ssh, but again just an option. If you don't want to continue that is fine, we can lock it up, I will leave it open for a bit though.