check_nrpe and NSClient: unknow protocol 252

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.
Locked
Bidouille
Posts: 6
Joined: Mon Apr 11, 2016 9:00 am

check_nrpe and NSClient: unknow protocol 252

Post by Bidouille »

Using NSClient 0.4.4 stable and running on a Win2008 server:
Allowed hosts definition: 10.0.0.0(255.0.0.0)
Binding to: [::]:5666(ipv6)
Attempting to bind to: [::]:5666(ipv6)
Binding to: 0.0.0.0:5666(ipv4), reopen: true, reuse: true
Attempting to bind to: 0.0.0.0:5666(ipv4)
NSClient++ - 0.4.4.23 2016-04-05 Started!
Since Nagios 3.3.1 under Debian, I try to execute a classical chech_nrpe -H < my_Win2008 >

Console in test mode show this:
Accepting connection from: 10.0.0.4, count=1
Failed to establish secure connection: unknown protocol: 252
Content of nsclient.ini:

Code: Select all

[/settings/default]
password = xxxxxx
allowed hosts = 10.0.0.0/8

[/settings/NRPE/server]
certificate key = 
certificate = ${certificate-path}/certificate.pem
ssl options = 
allowed ciphers = ADH
ssl = true
verify mode = none
insecure = true
payload length = 1024
allow nasty characters = false
allow arguments = true

[/modules]
CheckExternalScripts = 1
CheckHelpers = 1
CheckEventLog = 1
CheckNSCP = 1
CheckDisk = 1
CheckSystem = 1
NRPEServer = enabled
I don't understand what I missing. :(

Thanks for help
Last edited by Bidouille on Tue Apr 19, 2016 4:54 am, edited 1 time in total.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_nrpe and NSClient: unknow protocol 252

Post by rkennedy »

What happens if you execute the check_nrpe with the -n flag? (insecure mode)
Former Nagios Employee
Bidouille
Posts: 6
Joined: Mon Apr 11, 2016 9:00 am

Re: check_nrpe and NSClient: unknow protocol 252

Post by Bidouille »

Since Nagios:

Code: Select all

root@xxxxxxx:/usr/local/nagios/libexec# ./check_nrpe -H 10.0.0.45 -n
CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server logs for error messages.
Since Win2008 w/NSClient:
D rrpe Accepting connection from: 10.0.0.4, count=1
E nrpe Failed to establish secure connection: unknown protocol: 252
c:\source\nscp\include\socket/connection.hpp:243
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_nrpe and NSClient: unknow protocol 252

Post by Box293 »

I've tried your config on the same version of NSClient++ and it works fine.
Bidouille wrote:Since Nagios 3.3.1 under Debian, I try to execute a classical chech_nrpe -H < my_Win2008 >
What is your version of nrpe?

On your Debian server simply execute:

Code: Select all

/usr/local/nagios/libexec/check_nrpe
Post the output here.

Have you recently upgraded?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Bidouille
Posts: 6
Joined: Mon Apr 11, 2016 9:00 am

Re: check_nrpe and NSClient: unknow protocol 252

Post by Bidouille »

Box293 wrote:What is your version of nrpe?

Code: Select all

root@xxxxxxxx:/usr/local/nagios/libexec# ./check_nrpe -h
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.12
Last Modified: 03-10-2008
Box293 wrote:Post the output here.

Code: Select all

root@xxxxxxxx:/# usr/local/nagios/libexec/check_nrpe -H 10.0.0.45
CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server logs for error messages.
And give again same error on NSClient.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_nrpe and NSClient: unknow protocol 252

Post by lmiltchev »

Here's what I have in my nsclient.ini file (running NSClient++ ver. 0.4.4.15):

Code: Select all

[/settings/NRPE/server]
verify mode = none
insecure = true
use ssl = 1
allow nasty characters = 1
allow arguments = 1
port = 5666
extended response = 0
Also, change this:

Code: Select all

NRPEServer = enabled
to this:

Code: Select all

NRPEServer = 1
and restart NSClient++ service. Let us know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: check_nrpe and NSClient: unknow protocol 252

Post by lgroschen »

Also good to note that you need to enable NRPE in the nsclient++ config since it isn't on by default. This may fix your issue, in addition to adding your nagios server as an allowed host. (EDIT: or just ignore this post and read the post from the above intelligent and dutiful support technician)
/Luke
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_nrpe and NSClient: unknow protocol 252

Post by scottwilkerson »

Can you run this one more time and give more lines of output

Code: Select all

./check_nrpe -h
Here's what I get, I've bolded the important part
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bidouille
Posts: 6
Joined: Mon Apr 11, 2016 9:00 am

Re: check_nrpe and NSClient: unknow protocol 252

Post by Bidouille »

OK your posts help me to solve it

In [/settings/default] section, adding this line:

Code: Select all

use ssl = false
And now, that's work!
Locked