I have configured nagios server on Centos machine. I am trying to add a rhel 6.6 machine to this nagios server Version 4.2.0. While configuring NRPE and testing it, there is a step to check configuration as "/usr/local/nagios/libexec/check_nrpe -H localhost" I am getting the error as below at this step:
CHECK_NRPE: Error - Could not complete SSL handshake.
So, I used the -n option "/usr/local/nagios/libexec/check_nrpe -n -H localhost" and its shows a new error as below:
CHECK_NRPE: Error receiving data from daemon.
System logs just say: Aug 31 14:31:10 xxxxx xinetd[18730]: START: nrpe pid=18781 from=::1 Aug 31 14:31:10 xxxxx xinetd[18781]: FAIL: nrpe address from=::1 Aug 31 14:31:10 xxxxx xinetd[18730]: EXIT: nrpe status=0 pid=18781 duration=0(sec)
Any idea on why this shows up?
allowed_hosts parameter in nrpe.cfg file is already set to "allowed_hosts=127.0.0.1"
CHECK_NRPE: Error receiving data from daemon
Re: CHECK_NRPE: Error receiving data from daemon
Have you installed NRPE on the machine you're attempting to monitor?
Review this doc if you have not:
https://assets.nagios.com/downloads/nag ... e/NRPE.pdf
If you have installed NRPE on the remote machine, then the 1st step is to make sure your remote server has it's NRPE.cfg file set to allow your Nagios XI box to communicate:
allowed_hosts=nagios.xi.ip
For example, If you are using xinetd, you'll need to open the nrpe file on the client machine:
vi /etc/xinetd.d/nrpe
...and add the XI server's IP on the "only_from" line, for example:
only_from = 127.0.0.1 <nagios server IP>
Then restart the daemon:
service xinetd restart
Test if NRPE works locally on the client / remote machine:
./check_nrpe -H localhost
You should see NRPE v2.12
If that's successful, run a check from your nagios server against the client (you should see the same output as the above test)
./check_nrpe -H <client_IP>
If that fails, try telneting to the client from the Nagios server, to verify connectivity:
telnet <client_IP> 5666
If telnet is not allowed, use namp (from the Nagios server) to test connectivity"
nmap <client ip> -p 5666
Beyond that, refer to this doc for troubleshooting, its addressees the most common NRPE errors:
https://assets.nagios.com/downloads/nag ... utions.pdf
Review this doc if you have not:
https://assets.nagios.com/downloads/nag ... e/NRPE.pdf
If you have installed NRPE on the remote machine, then the 1st step is to make sure your remote server has it's NRPE.cfg file set to allow your Nagios XI box to communicate:
allowed_hosts=nagios.xi.ip
For example, If you are using xinetd, you'll need to open the nrpe file on the client machine:
vi /etc/xinetd.d/nrpe
...and add the XI server's IP on the "only_from" line, for example:
only_from = 127.0.0.1 <nagios server IP>
Then restart the daemon:
service xinetd restart
Test if NRPE works locally on the client / remote machine:
./check_nrpe -H localhost
You should see NRPE v2.12
If that's successful, run a check from your nagios server against the client (you should see the same output as the above test)
./check_nrpe -H <client_IP>
If that fails, try telneting to the client from the Nagios server, to verify connectivity:
telnet <client_IP> 5666
If telnet is not allowed, use namp (from the Nagios server) to test connectivity"
nmap <client ip> -p 5666
Beyond that, refer to this doc for troubleshooting, its addressees the most common NRPE errors:
https://assets.nagios.com/downloads/nag ... utions.pdf
Be sure to check out the Knowledgebase for helpful articles and solutions!
Re: CHECK_NRPE: Error receiving data from daemon
Hi Team,
Hope you have read my update. I have clearly told that I am trying the command "/usr/local/nagios/libexec/check_nrpe -n -H localhost" and I am using localhost here. It is not working. I am not trying to connect to remote host, but localhost.
I have restarted xinetd multiple times.
I am using nagios Version 4.2.0 and not Nagios XI.
allowed_hosts parameter in nrpe.cfg file is already set to "allowed_hosts=127.0.0.1"
Please let me know if there is a solution for error "CHECK_NRPE: Error receiving data from daemon"
Also, kindly go through my update once again, before giving a template reply. I have tried all solution I could find on internet, please give an exact solution to my issue rather than a template or document, which I have followed already.
Hope you have read my update. I have clearly told that I am trying the command "/usr/local/nagios/libexec/check_nrpe -n -H localhost" and I am using localhost here. It is not working. I am not trying to connect to remote host, but localhost.
I have restarted xinetd multiple times.
I am using nagios Version 4.2.0 and not Nagios XI.
allowed_hosts parameter in nrpe.cfg file is already set to "allowed_hosts=127.0.0.1"
Please let me know if there is a solution for error "CHECK_NRPE: Error receiving data from daemon"
Also, kindly go through my update once again, before giving a template reply. I have tried all solution I could find on internet, please give an exact solution to my issue rather than a template or document, which I have followed already.
Re: CHECK_NRPE: Error receiving data from daemon
1) Try this ./check_nrpe -H 127.0.0.1
Does that work?
2) Try pinging your localhost
ping <hostname>
3) Try this command:
./check_nrpe -H <hostname>
I'm betting steps 2 & 3 fail, because the the local machine can't resolve its own hostname.
Does that work?
2) Try pinging your localhost
ping <hostname>
3) Try this command:
./check_nrpe -H <hostname>
I'm betting steps 2 & 3 fail, because the the local machine can't resolve its own hostname.
Be sure to check out the Knowledgebase for helpful articles and solutions!