Could not complete SSL handshake (check_nrpe is fine)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Could not complete SSL handshake (check_nrpe is fine)

Post by scottwilkerson »

On the client run something like:

Code: Select all

/usr/local/nagios/bin/nrpe --help

NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
On the Nagios server run something like:

Code: Select all

/usr/local/nagios/libexec/check_nrpe --help

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
Lets see the output of both, they should both say something like "SSL/TLS Available"
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
hazmat
Posts: 39
Joined: Wed Mar 19, 2014 9:17 am

Re: Could not complete SSL handshake (check_nrpe is fine)

Post by hazmat »

Thanks.

Client:

Code: Select all

NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
TCP Wrappers Available
Server:

Code: Select all

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Could not complete SSL handshake (check_nrpe is fine)

Post by slansing »

Do you by any chance have another NRPE enabled system you can run a test against? One that was either compiled with SSL support or not?
hazmat
Posts: 39
Joined: Wed Mar 19, 2014 9:17 am

Re: Could not complete SSL handshake (check_nrpe is fine)

Post by hazmat »

Actually, this nagios server has been successfully monitoring a Windows server as well as a bunch of networked printers and switches.

I'll repeat the current setup for the monitoring.

nagios server:

Code: Select all

check_command        check_nrpe!check_disk!-a '-w 20% -c 10% -p /var'
monitored client:

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Could not complete SSL handshake (check_nrpe is fine)

Post by scottwilkerson »

hazmat wrote:Thanks again for the help here. I took the nagios install from the server and now I can run remote commands from the command line.

$ check_nrpe -H 1.2.3.4 -c check_disk -a '-w 20% -c 10% -p /var'
DISK OK - free space: /var 5418 MB (72% inode=99%);| /var=2107MB;6348;7141;0;7935

However, when I run via the application, I get "No output returned from plugin". This is the command I have in the cfg on the nagios server:

check_command check_nrpe!check_disk!-a '-w 20% -c 10% -p /var'

Thanks.
I am a little confused, if you can run this from the nagios server, where 1.2.3.4 is your client, then it really doesn't make any sense why you would get "No output returned from plugin" when run from Nagios if infact your check_nrpe command is set to

Code: Select all

command_line    /usr/local/nagios/libexec/check_nrpe -n -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
Is this correct?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
hazmat
Posts: 39
Joined: Wed Mar 19, 2014 9:17 am

Re: Could not complete SSL handshake (check_nrpe is fine)

Post by hazmat »

Yeah, that's correct, but the error, at least now, is "CHECK_NRPE: Error receiving data from daemon". Not sure what else I should look at. The "command_line" statement should be in commands.cfg?

Thanks.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Could not complete SSL handshake (check_nrpe is fine)

Post by slansing »

Yes, in nagios core you would set your command there and reference it across your services. We still need to know if you have another server with NRPE on it that you can test this against, you mentioned printers and switches... well they don't use NRPE. I was trying to ask if you could test this on a known, working, linux system with NRPE on it.
hazmat
Posts: 39
Joined: Wed Mar 19, 2014 9:17 am

Re: Could not complete SSL handshake (check_nrpe is fine)

Post by hazmat »

I tried it on another Linux machine in the same data center and am getting the same errors. I'm finding it hard to believe that it's a networking issue, though, since running check_nrpe from the command line of the nagios server gets the proper results. So I'm guessing it's a configuration problem. Here's what I have.

From commands.cfg:

Code: Select all

command_line    /usr/local/nagios/libexec/check_nrpe -n -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
From the client's config on the nagios server:

Code: Select all

check_command    check_nrpe!check_disk!-a '-w 20% -c 10% -p /var'
From nrpe.cfg on the client machine:

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
Thanks as always.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Could not complete SSL handshake (check_nrpe is fine)

Post by lmiltchev »

$ check_nrpe -H 1.2.3.4 -c check_disk -a '-w 20% -c 10% -p /var'
DISK OK - free space: /var 5418 MB (72% inode=99%);| /var=2107MB;6348;7141;0;7935
Here, you are not passing "-n" flag...
command_line /usr/local/nagios/libexec/check_nrpe -n -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
but here, you are...
Be sure to check out our Knowledgebase for helpful articles and solutions!
hazmat
Posts: 39
Joined: Wed Mar 19, 2014 9:17 am

Re: Could not complete SSL handshake (check_nrpe is fine)

Post by hazmat »

Holy crap that did it. THANK YOU!
Locked