NRPE - Error: Could not complete SSL handshake. 1

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
gpr
Posts: 8
Joined: Mon May 12, 2014 9:18 am

NRPE - Error: Could not complete SSL handshake. 1

Post 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...
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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.
gpr
Posts: 8
Joined: Mon May 12, 2014 9:18 am

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

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
gpr
Posts: 8
Joined: Mon May 12, 2014 9:18 am

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

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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, :)
gpr
Posts: 8
Joined: Mon May 12, 2014 9:18 am

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

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
gpr
Posts: 8
Joined: Mon May 12, 2014 9:18 am

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

Post by gpr »

It's seems to work, but it doesn't work :(
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked