Page 1 of 1

CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL ha

Posted: Mon Feb 10, 2020 3:45 am
by Ponashish
Dear all,

I've installed a Nagios Core server 4.4.5 based on Ubuntu 18.04 OS.

I still trying to monitoring a Windows 2012 server but I continue to receive the error CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with xxx.xxx.xxx.xxx

On windows, I've installed NSCP-0.4.4.23-x64,

please could you help me to solve this error?
Thanks

Re: CHECK_NRPE: (ssl_err != 5) Error - Could not complete SS

Posted: Mon Feb 10, 2020 5:46 pm
by tgriep
In the NSClient.ini file under this section

Code: Select all

[/settings/NRPE/server]
Add all of the following options.

Code: Select all

ssl options = 
allow arguments = true
allow nasty characters = true
use ssl = 1
port = 5666
extended response = 1
Save the change and restart NSClient++ and test it from the Nagios server using the check_nrpe plugin to see if it can connect.

Re: CHECK_NRPE: (ssl_err != 5) Error - Could not complete SS

Posted: Tue Feb 11, 2020 2:24 am
by Ponashish
Hi, Thanks for your reply.
I tried adding the suggested line in the ini conf but the error is the same.

Please, see also my command to test that, (maybe is wrong).

administrator@xxx:~$ /usr/lib/nagios/plugins/check_nrpe -H xxx
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with xxx: 1

Here also the log into nsclient.log file:

2020-02-11 08:14:50: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: sslv3 alert handshake failure: 1040

Searching on google and following instructions i also made other test:

administrator@xxx:/usr/lib/nagios/plugins$ /usr/lib/nagios/plugins/check_nrpe -2 -H xxx
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with xxx: 1

administrator@xxx:/usr/lib/nagios/plugins$ /usr/lib/nagios/plugins/check_nrpe -n -H xxx
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).

administrator@xxx:/usr/lib/nagios/plugins$ ldd /usr/lib/nagios/plugins/check_nrpe linux-vdso.so.1 (0x00007fff29fb2000)
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007ff379380000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007ff378eb5000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff378ac4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff3788a5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff3786a1000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff37981a000)

I also tied to disable SSL on the ini with USE SSL = 0 and the test goes in timeout. On the log the error is failed to read data end of file

As attachment the new ini files.
Thanks

Re: CHECK_NRPE: (ssl_err != 5) Error - Could not complete SS

Posted: Tue Feb 11, 2020 12:20 pm
by tgriep
I attached a new copy of the nsclient.ini file that tested OK on my system.
There were a few options missing which caused the issue.
Just overwrite your existing copy and restart NSClient++ and it should work for you.

Re: CHECK_NRPE: (ssl_err != 5) Error - Could not complete SS

Posted: Wed Feb 12, 2020 2:07 am
by Ponashish
Hi. Thanks for the support, I tried your in file but the error is the same.
See below:

administrator@xxx:~$ /usr/local/nagios/libexec/check_nrpe -H xxx
-bash: /usr/local/nagios/libexec/check_nrpe: No such file or directory
administrator@xxx:~$ /usr/lib/nagios/plugins/check_nrpe -H xxx
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with xxx: 1
administrator@xxx:~$ /usr/lib/nagios/plugins/check_nrpe -V
NRPE Plugin for Nagios
Version: 3.2.1

Re: CHECK_NRPE: (ssl_err != 5) Error - Could not complete SS

Posted: Wed Feb 12, 2020 3:01 am
by Ponashish
After three days i solved following this article:

http://hodza.net/2019/09/21/failed-to-e ... lure-1040/

Thanks tgriep for your support.

Regards

Re: CHECK_NRPE: (ssl_err != 5) Error - Could not complete SS

Posted: Wed Feb 12, 2020 8:16 am
by scottwilkerson
Ponashish wrote:After three days i solved following this article:

http://hodza.net/2019/09/21/failed-to-e ... lure-1040/

Thanks tgriep for your support.

Regards
Glad to hear it is solved!

Locking thread