Hodžův blog

21 Zář

Failed to establish secure connection: sslv3 alert handshake failure: 1040

Debian 10 (Buster) + latest NSClient++ on Windows 2019 server

root@nagios:/# /usr/lib/nagios/plugins/check_nrpe -H -c check_ad
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with 1

2019-09-21 18:30:46: error:c:\source\master\include\socket/connection.hpp:273: Seems we other end is not using ssl: unknown protocol
2019-09-21 18:30:46: error:c:\source\master\include\socket/connection.hpp:274: Please review the ssl option as well as ssl options in settings.
2019-09-21 18:30:48: error:c:\source\master\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040

Quick FIX:
1. Generate DH key on Linux machine (it takes a long time)
openssl dhparam -C 2048 2> /dev/null|sed -n '/BEGIN/,/END/p'


2. Paste your DH key to newly created file
C:\Program Files\NSClient++\security\nrpe_dh_2048.pem

3. Open command prompt in Windows (under user with admin privilegs) and run these commands:
cd "\Program Files\NSClient++"
nscp settings --path /settings/NRPE/server --key dh --set "${certificate-path}/nrpe_dh_2048.pem"

4. Restart NSClient++ service
net stop nscp && net start nscp

Test it:
root@nagios:/# /usr/lib/nagios/plugins/check_nrpe -H
I ( 2018-01-28) seem to be doing fine...

root@nagios:/# /usr/lib/nagios/plugins/check_nrpe -H -c ad_status
OK - services: OK. replications: OK. advertising: OK. fsmocheck: OK. ridmanager: OK. machineaccount: OK.

4 komentáře to “Failed to establish secure connection: sslv3 alert handshake failure: 1040”

  1. 1
    Jakub Štajner Says:

    Wow, it works!
    I have tried about 10 workarounds and none of them works properly – this is a real life saver!!!

    Thank you 🙂

  2. 2
    Aleksander Says:

    Thank you!
    Could you share „ad_status“ nsclient script, please!

  3. 3
    Richard Durivage Says:

    Thank you so much for these troubleshooting steps! Truly a life saver! Worked 100% first shot!

  4. 4
    admin Says:


Leave a Reply

Hodžův blog is is proudly powered by Wordpress and the Magellan Theme