NRPE not working (SSL-Handshake)

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.
freakazoid
Posts: 9
Joined: Wed Oct 10, 2018 10:35 am

Re: NRPE not working (SSL-Handshake)

Post by freakazoid »

I redid the whole Ubuntu part.

When I check the localhost, I receive this:

Code: Select all

check_nrpe -H localhost
NRPE v3.2.1
But for the host, I still receive the same error:

Code: Select all

CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with <HOST_IP>: 1 
The Log File Looks like this:

Code: Select all

2018-10-16 09:48:06: debug:c:\source\master\service\NSClient++.cpp:219: On crash: restart: nscp
2018-10-16 09:48:06: debug:c:\source\master\service\NSClient++.cpp:231: Archiving crash dumps in: C:\Program Files (x86)\NSClient++/crash-dumps
2018-10-16 09:48:07: debug:c:\source\master\service\plugin_manager.cpp:150: Found: CheckDisk
2018-10-16 09:48:07: debug:c:\source\master\service\plugin_manager.cpp:150: Found: CheckExternalScripts
2018-10-16 09:48:07: debug:c:\source\master\service\plugin_manager.cpp:150: Found: CheckNSCP
2018-10-16 09:48:07: debug:c:\source\master\service\plugin_manager.cpp:150: Found: CheckSystem
2018-10-16 09:48:07: debug:c:\source\master\service\plugin_manager.cpp:150: Found: NRPEServer
2018-10-16 09:48:07: debug:c:\source\master\service\plugin_manager.cpp:150: Found: NSClientServer
2018-10-16 09:48:07: debug:c:\source\master\service\plugin_manager.cpp:306: Loading module C:\Program Files (x86)\NSClient++\modules\CheckDisk.dll ()
2018-10-16 09:48:08: debug:c:\source\master\service\plugin_manager.cpp:306: Loading module C:\Program Files (x86)\NSClient++\modules\CheckExternalScripts.dll ()
2018-10-16 09:48:09: debug:c:\source\master\service\plugin_manager.cpp:306: Loading module C:\Program Files (x86)\NSClient++\modules\CheckNSCP.dll ()
2018-10-16 09:48:11: debug:c:\source\master\service\plugin_manager.cpp:306: Loading module C:\Program Files (x86)\NSClient++\modules\CheckSystem.dll ()
2018-10-16 09:48:12: debug:c:\source\master\service\plugin_manager.cpp:306: Loading module C:\Program Files (x86)\NSClient++\modules\NRPEServer.dll ()
2018-10-16 09:48:12: debug:c:\source\master\service\plugin_manager.cpp:306: Loading module C:\Program Files (x86)\NSClient++\modules\NSClientServer.dll ()
2018-10-16 09:48:14: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: CheckDisk
2018-10-16 09:48:14: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: CheckExternalScripts
2018-10-16 09:48:14: debug:c:\source\master\modules\CheckExternalScripts\CheckExternalScripts.cpp:127: No aliases found (adding default)
2018-10-16 09:48:14: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: CheckNSCP
2018-10-16 09:48:14: debug:c:\source\master\modules\CheckNSCP\CheckNSCP.cpp:51: Crash folder is: C:\Program Files (x86)\NSClient++/crash-dumps
2018-10-16 09:48:14: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: CheckSystem
2018-10-16 09:48:14: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: NRPEServer
2018-10-16 09:48:14: debug:c:\source\master\modules\NRPEServer\NRPEServer.cpp:126: Allowed hosts definition: <NAGIOS-SERVER-IP>(255.255.255.255)
2018-10-16 09:48:14: debug:c:\source\master\modules\NRPEServer\NRPEServer.cpp:127: Server config: address: :5666, ssl enabled: none, no certificate, dh: C:\Program Files (x86)\NSClient++/security/nrpe_dh_512.pem, ciphers: ADH, ca: C:\Program Files (x86)\NSClient++/security/ca.pem, options: 
2018-10-16 09:48:15: debug:c:\source\master\include\socket/server.hpp:111: Binding to: [::]:5666(ipv6)
2018-10-16 09:48:15: debug:c:\source\master\include\socket/server.hpp:214: Attempting to bind to: [::]:5666(ipv6)
2018-10-16 09:48:15: debug:c:\source\master\include\socket/server.hpp:107: Binding to: 0.0.0.0:5666(ipv4), reopen: true, reuse: true
2018-10-16 09:48:15: debug:c:\source\master\include\socket/server.hpp:214: Attempting to bind to: 0.0.0.0:5666(ipv4)
2018-10-16 09:48:15: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: NSClientServer
2018-10-16 09:48:15: debug:c:\source\master\modules\NSClientServer\NSClientServer.cpp:86: Allowed hosts definition: <NAGIOS-SERVER-IP>(255.255.255.255)
2018-10-16 09:48:15: debug:c:\source\master\include\socket/server.hpp:111: Binding to: [::]:12489(ipv6)
2018-10-16 09:48:15: debug:c:\source\master\include\socket/server.hpp:214: Attempting to bind to: [::]:12489(ipv6)
2018-10-16 09:48:15: debug:c:\source\master\include\socket/server.hpp:107: Binding to: 0.0.0.0:12489(ipv4), reopen: true, reuse: true
2018-10-16 09:48:15: debug:c:\source\master\include\socket/server.hpp:214: Attempting to bind to: 0.0.0.0:12489(ipv4)
2018-10-16 09:48:15: debug:c:\source\master\service\NSClient++.cpp:317: NSClient++ - 0.5.2.35 2018-01-28 Started!
2018-10-16 09:48:15: debug:c:\source\master\service\NSClient++.cpp:441: Starting: DONE
2018-10-16 09:48:18: debug:c:\source\master\modules\CheckSystem\pdh_thread.cpp:169: Loading counter: disk_queue_length_0 C: = \\WIN-7O3FI4FN4V5\Physikalischer Datenträger(0 C:)\Zeit (%)
2018-10-16 09:48:18: debug:c:\source\master\modules\CheckSystem\pdh_thread.cpp:169: Loading counter: disk_queue_length__Total = \\WIN-7O3FI4FN4V5\Physikalischer Datenträger(_Total)\Zeit (%)
2018-10-16 09:51:18: debug:c:\source\master\include\nrpe/server/protocol.hpp:92: Accepting connection from: <NAGIOS-SERVER-IP>, count=1
2018-10-16 09:51:18: error:c:\source\master\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-10-16 09:53:56: debug:c:\source\master\include\check_nt/server/protocol.hpp:77: Accepting connection from: <NAGIOS-SERVER-IP>
2018-10-16 09:53:56: debug:c:\source\master\modules\NSClientServer\NSClientServer.cpp:302: Real command: check_memory warn=used<0 crit=used<0 filter=none type=committed perf-config=used(unit:B)free(unit:B)
2018-10-16 09:54:14: debug:c:\source\master\include\check_nt/server/protocol.hpp:77: Accepting connection from: <NAGIOS-SERVER-IP>
2018-10-16 09:54:14: debug:c:\source\master\modules\NSClientServer\NSClientServer.cpp:302: Real command: check_drivesize drive=c warn=free<0 crit=free<0 filter=type='fixed' and mounted = 1 perf-config=used(unit:B)free(unit:B)
2018-10-16 09:54:42: debug:c:\source\master\include\check_nt/server/protocol.hpp:77: Accepting connection from: <NAGIOS-SERVER-IP>
2018-10-16 09:54:42: debug:c:\source\master\modules\NSClientServer\NSClientServer.cpp:302: Real command: check_process process=explorer.exe top-syntax=${list} detail-syntax=${exe}: ${legacy_state} empty-syntax=OK: All processes are running.
2018-10-16 09:55:10: debug:c:\source\master\include\check_nt/server/protocol.hpp:77: Accepting connection from: <NAGIOS-SERVER-IP>
2018-10-16 09:55:28: debug:c:\source\master\include\check_nt/server/protocol.hpp:77: Accepting connection from: <NAGIOS-SERVER-IP>
2018-10-16 09:55:28: debug:c:\source\master\modules\NSClientServer\NSClientServer.cpp:302: Real command: check_cpu time=5m
2018-10-16 09:56:24: debug:c:\source\master\include\check_nt/server/protocol.hpp:77: Accepting connection from: <NAGIOS-SERVER-IP>
2018-10-16 09:56:24: debug:c:\source\master\modules\NSClientServer\NSClientServer.cpp:302: Real command: check_uptime warn=uptime<0
2018-10-16 09:56:33: debug:c:\source\master\include\check_nt/server/protocol.hpp:77: Accepting connection from: <NAGIOS-SERVER-IP>
2018-10-16 09:56:33: debug:c:\source\master\modules\NSClientServer\NSClientServer.cpp:302: Real command: check_service service=DHCP-Client top-syntax=${list} detail-syntax=${name}: ${legacy_state} empty-syntax=OK: All services are in their appropriate state. filter=none crit=not state = 'running'

Thank you a lot for your help
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE not working (SSL-Handshake)

Post by tgriep »

The only thing left to try is to reinstall the NSClient++ agent.
I verified that the settings in your nsclient.ini file work and also, I tested it with the same version of NSClient. But I tested with the 64 bit version.
What you could do is to backup the nsclient.ini file and remove the NSClient++ agent. Delete the folder on the C Drive to make sure there is nothing left.
Then install the NSCLient++ agent again and put back the nsclient.ini file.
If the Windows server is 64 bit, install the 64 bit version of the NSClient++ agent.
Be sure to check out our Knowledgebase for helpful articles and solutions!
freakazoid
Posts: 9
Joined: Wed Oct 10, 2018 10:35 am

Re: NRPE not working (SSL-Handshake)

Post by freakazoid »

I tried to reinstall the specific NSClient but it it didn't work either.

Is there any other possibility to run scripts (for Backup-Software-Check, for Windows-Updates-Check) ?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE not working (SSL-Handshake)

Post by tgriep »

There are a couple of options.
You can install the latest stable 0.4.4.x version of NSClient++.
http://nsclient.org/download/0.4.4/

Or you can use the NCPA agent on the Windows server.
More information on that agent can be found here.
https://www.nagios.org/ncpa/

If you provide some information about the Nagios server and the Windows system, that would help out.
You said you went through the Ubuntu section of the plugin installation, what version and release of Ubuntu are you running?
In the folder with the NRPE source, can you post the install.log file?

Also, provide some details on the Windows system.
Which OS, service pack level, 32 bit or 64 bit?
Be sure to check out our Knowledgebase for helpful articles and solutions!
freakazoid
Posts: 9
Joined: Wed Oct 10, 2018 10:35 am

Re: NRPE not working (SSL-Handshake)

Post by freakazoid »

Thank you for your help.

I was able to get the client going.
Now the scripts are working.

Thank you
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE not working (SSL-Handshake)

Post by tgriep »

Your welcome. I'll lock up the post for you. If you have any questions in the future, feel free to open a new post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked