Page 1 of 2

NRPE - Error: Could not complete SSL handshake. 1

Posted: Mon May 12, 2014 9:32 am
by gpr
Hi all,

Just installed Nagios XI with VM packaged.
I would like to monitor ubuntu servers.
I installed nagios-agent and dependancies on 2 ubuntu test servers.
I configure NRPE, but alway the same error : Error: Could not complete SSL handshake. 1

On Nagios server (VM which monitors other), when I test to contact clients side :

Code: Select all

 /usr/local/nagios/libexec/check_nrpe -H 192.168.0.10
NRPE v2.12

Code: Select all

 /usr/local/nagios/libexec/check_nrpe -H 192.168.0.20
NRPE v2.12
On clients, I edited nrpe.cfg :

Code: Select all

allowed_hosts=127.0.0.1,192.168.0.30
I checked NRPE status on monitored hosts:

Code: Select all

nagios   29331     1  0 May05 ?        00:00:52 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
But in /var/log/syslog :

Code: Select all

May 12 16:25:05 VMLINUXDEV nrpe[29331]: Daemon shutdown
May 12 16:25:06  nrpe[6871]: Starting up daemon
May 12 16:25:06 nrpe[6871]: Listening for connections on port 5666
May 12 16:25:06 nrpe[6871]: Allowing connections from: 127.0.0.1,192.168.0.30
May 12 16:26:27 nrpe[6896]: Error: Could not complete SSL handshake. 1
If you have an idea, because I become crazy with this noob error...

Re: NRPE - Error: Could not complete SSL handshake. 1

Posted: Mon May 12, 2014 10:24 am
by slansing
This document will probably become one of your best friends while dealing with NRPE:

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

Did you compile NRPE with SSL support? It looks like you can talk to a couple servers from Nagios XI, try running a check command with the '-n' flag and see if it goes through, also, please post the command you are using to check this with. It could be as simple as one of the default NRPE checks.

Re: NRPE - Error: Could not complete SSL handshake. 1

Posted: Mon May 12, 2014 10:42 am
by gpr
I read this doc but not solved my problem :s
I compiled NRE with SSL (first install, libssl-dev was missing).

Strange, but result is not the same with -n option...

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.0.20
CHECK_NRPE: Error receiving data from daemon.

Re: NRPE - Error: Could not complete SSL handshake. 1

Posted: Mon May 12, 2014 12:46 pm
by abrist
So the nagios server can connect to the remote hosts through nrpe:

Code: Select all

    /usr/local/nagios/libexec/check_nrpe -H 192.168.0.10
    NRPE v2.12

Code: Select all

    /usr/local/nagios/libexec/check_nrpe -H 192.168.0.20
    NRPE v2.12
Which would lead me to believe that the daemon and connection is fine. You plugin may not be returning/exiting correctly. You claimed in the last post that you tried with the -n option, but I don't see the switch in your command:
/usr/local/nagios/libexec/check_nrpe -H 192.168.0.20
CHECK_NRPE: Error receiving data from daemon.

Re: NRPE - Error: Could not complete SSL handshake. 1

Posted: Tue May 13, 2014 2:03 am
by gpr
Hi,

I confirm I tested with -n option. Just a bad copy/paste

Code: Select all

[root@vmrecnagios ~]# /usr/local/nagios/libexec/check_nrpe -n -H 192.168.0.10
CHECK_NRPE: Error receiving data from daemon.
Without option :

Code: Select all

[root@vmrecnagios ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.0.10
NRPE v2.12

Re: NRPE - Error: Could not complete SSL handshake. 1

Posted: Tue May 13, 2014 9:45 am
by slansing
What command are you issuing when you see this:
I configure NRPE, but alway the same error : Error: Could not complete SSL handshake.
It does not look like you're always getting the error, :)

Re: NRPE - Error: Could not complete SSL handshake. 1

Posted: Tue May 13, 2014 11:04 am
by gpr
To install and configure NRPE from sources :

Code: Select all

wget http://.....
tar zxvf nrpe-2.12.tar.gz
cd nrpe-2.12
./configure
make all
make install
This error message appears only in /var/log/message , not when I use specific command..

In my Nagios GUI, I see alerts message : CHECK_NRPE: Error receiving data from daemon.

Re: NRPE - Error: Could not complete SSL handshake. 1

Posted: Tue May 13, 2014 5:24 pm
by abrist
It looks like ssl is enabled and working:
[root@vmrecnagios ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.0.10
NRPE v2.12

Re: NRPE - Error: Could not complete SSL handshake. 1

Posted: Wed May 14, 2014 4:42 am
by gpr
It's seems to work, but it doesn't work :(

Re: NRPE - Error: Could not complete SSL handshake. 1

Posted: Wed May 14, 2014 1:05 pm
by abrist
gpr wrote:It's seems to work, but it doesn't work :(
Well, version checking is working, so the connection is good. Can you post one of the full commands that are failing? It must be a command syntax problem or a remote daemon config problem.