NRPE - Error: Could not complete SSL handshake. 1

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

NRPE - Error: Could not complete SSL handshake. 1

Postby gpr » Mon May 12, 2014 9:32 am

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

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

Postby slansing » Mon May 12, 2014 10:24 am

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.
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

Postby gpr » Mon May 12, 2014 10:42 am

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

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

Postby abrist » Mon May 12, 2014 12:46 pm

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

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

Postby gpr » Tue May 13, 2014 2:03 am

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

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

Postby slansing » Tue May 13, 2014 9:45 am

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, :)
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

Postby gpr » Tue May 13, 2014 11:04 am

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

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

Postby abrist » Tue May 13, 2014 5:24 pm

It looks like ssl is enabled and working:
[root@vmrecnagios ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.0.10
NRPE v2.12
"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.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Postby gpr » Wed May 14, 2014 4:42 am

It's seems to work, but it doesn't work :(
gpr
 
Posts: 8
Joined: Mon May 12, 2014 9:18 am

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

Postby abrist » Wed May 14, 2014 1:05 pm

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

Next

Return to Nagios XI

Who is online

Users browsing this forum: No registered users and 6 guests