Page 1 of 1

Nagios client error

Posted: Mon Jan 30, 2012 7:15 am
by kamalkakkar
Hi All,

I have configured a Nagios server ip "192.168.99.86" and it is working fine on server. However, I have configured nagios client too but I am getting below error.

____________________________
Nagios client error

[root@ns1 ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.99.86
CHECK_NRPE: Error - Could not complete SSL handshake.

____________________________

Please have a look on my Nagios client file too:

[root@ns1 ~]# service xinetd status
xinetd (pid 11390) is running...

[root@ns1 ~]# netstat -at |grep nrpe
tcp 0 0 *:nrpe *:* LISTEN
___________
[root@ns1 ~]# cat /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1 192.168.99.86
}

_________________________

Note: I have installed "nrpe-2.12" with --enable ssl on my client system or "nagios-plugins-1.4.13"

_________________________

I have disabled the firewall on server site as well client site, but unable to resolve it.


Please help me to resolve this issue.

Thanks in Advance
Kamal

Re: Nagios client error

Posted: Mon Jan 30, 2012 12:42 pm
by scottwilkerson
kamalkakkar wrote: [root@ns1 ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.99.86
CHECK_NRPE: Error - Could not complete SSL handshake.
This should be running from the server

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <CLIENT_IP>

Re: Nagios client error

Posted: Mon Jan 30, 2012 12:52 pm
by lmiltchev
Did you install the linux agent, following our documentation?

http://assets.nagios.com/downloads/nagi ... _Agent.pdf

Did you restart the daemon, after making changes in /etc/xinetd/nrpe?

Code: Select all

# service xinetd restart
Run the following command on your client machine and post the output:

Code: Select all

# /usr/local/nagios/libexec/check_nrpe -H localhost
Try from your nagios server:

Code: Select all

# /usr/local/nagios/libexec/check_nrpe -H <your_client_IP_address>
also

Code: Select all

# telnet <your_client_IP_address> 5666

Re: Nagios client error

Posted: Sun Feb 12, 2012 2:29 pm
by nagiosadmin42
I was getting the same error on my Nagios XI server when attempting to test the communication with a new remote host (Ubuntu, in my case):

Code: Select all

# ./check_nrpe -H 10.30.30.127
CHECK_NRPE: Error - Could not complete SSL handshake.
I went through all of the steps noted in this thread, and finally dug up the NRPE Documentation (http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf) and saw a note in the Troubleshooting section about making sure to review the system logs. And sure enough, in /var/log/syslog I found these entries:

Code: Select all

# cat /var/log/syslog | grep xinetd
...
Feb 12 10:24:26 CDU001-C8 xinetd[5398]: bind failed (Address already in use (errno = 98)). service = nrpe
Feb 12 10:24:26 CDU001-C8 xinetd[5398]: Service nrpe failed to start and is deactivated.
Feb 12 10:24:26 CDU001-C8 xinetd[5398]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Feb 12 10:24:26 CDU001-C8 xinetd[5398]: Started working: 0 available services
So even though "service xinetd restart" appeared to be working from the command line, it really wasn't starting NRPE.

Doing a full stop and start cleared things up and fixed it for me.

Code: Select all

# service xinetd stop
# service xinetd start

Re: Nagios client error

Posted: Mon Feb 13, 2012 10:47 am
by scottwilkerson
Thank you for sharing this with others.