CHECK_NRPE: Receive header underflow - only 0 bytes received

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.
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Post by cocoyanouck »

Sorry I was abroad last month...

On webconsole :

Code: Select all

Ax-Omnis-Automate.snfindiavizag.com
Check Omnis.exe is running
UNKNOWN	08-06-2018 08:51:27	1d 20h 0m 20s	3/3	(No output on stdout) stderr: *** Error in `/usr/local/nagios/libexec/check_nrpe': corrupted size vs. prev_size: 0x016d4188 *** 
And output of ls -al /usr/local/nagios/libexec/check_nrpe :
-rwxr-xr-x 1 root nagios 43056 juil. 2 11:00 /usr/local/nagios/libexec/check_nrpe
Yes i'm sure this is the same server.

Nagios config for this service on windows.cfg :

Code: Select all

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       Ax-Omnis-Automate.snfindiavizag.com     ; The name we're giving to this host
        alias           AX-Omnis-Automate       ; A longer name associated with the host
        address         10.30.2.38      ; IP address of the host
        }

define service{
        use                     generic-service
        host_name               Ax-Omnis-Automate.snfindiavizag.com
        service_description     Check Omnis.exe is running
        check_command           check_nrpe!CheckProcState! "omnis.exe=started" MinCritCount=0
}
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Post by scottwilkerson »

So I see in your history there is a plugin in 2 locations, can you run the following:

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -V|head -8
and

Code: Select all

/usr/local/nagios/libexec/check_nrpe -V|head -8
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Post by cocoyanouck »

First :

Code: Select all

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 3.0.1
Last Modified: 09-08-2016
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: OpenSSL 0.9.6 or higher required
Second :

Code: Select all

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 3.0.1
Last Modified: 09-08-2016
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: OpenSSL 0.9.6 or higher required
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Post by scottwilkerson »

And lets run the following on both

Code: Select all

ls -al /usr/lib/nagios/plugins/check_nrpe
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Post by cocoyanouck »

Code: Select all

ls -al /usr/lib/nagios/plugins/check_nrpe
-rwxr-xr-x 1 root root 43056 juil.  7  2017 /usr/lib/nagios/plugins/check_nrpe

Code: Select all

root@Nagios-VZ:/home/nagios# ls -al /usr/local/nagios/libexec/check_nrpe
-rwxr-xr-x 1 root nagios 43056 juil.  2 11:00 /usr/local/nagios/libexec/check_nrpe
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Post by scottwilkerson »

What is the full command you run when you get this output?

Code: Select all

UNKNOWN   08-06-2018 08:51:27   1d 20h 0m 20s   3/3   (No output on stdout) stderr: *** Error in `/usr/local/nagios/libexec/check_nrpe': corrupted size vs. prev_size: 0x016d4188 *** 
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Post by cocoyanouck »

This is this service :

Code: Select all

define service{
        use                     generic-service
        host_name               Ax-Omnis-Automate.snfindiavizag.com
        service_description     Check Omnis.exe is running
        check_command           check_nrpe!CheckProcState! "omnis.exe=started" MinCritCount=0
}
So, this command : check_nrpe!CheckProcState! "omnis.exe=started" MinCritCount=0

Now I monitore lots of windows-server, everything is working fine except commands which are using check_nrpe : please see attachment file.


Maybe this can help you, more details on memory_usage :

Code: Select all

Status Information:	(No output on stdout) stderr: *** Error in `/usr/local/nagios/libexec/check_nrpe': corrupted size vs. prev_size: 0x00c43180 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x6738a)[0xb73a538a]
/lib/i386-linux-gnu/libc.so.6(+0x6dfc7)[0xb73abfc7]
/lib/i386-linux-gnu/libc.so.6(+0x6f082)[0xb73ad082]
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.2(CRYPTO_free+0x33)[0xb75561b3]
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.2(BN_clear_free+0x72)[0xb758df42]
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.2(DH_free+0x102)[0xb75bfe22]
/usr/lib/i386-linux-gnu/libssl.so.1.0.2(+0x3a03a)[0xb774e03a]
/usr/lib/i386-linux-gnu/libssl.so.1.0.2(SSL_SESSION_free+0x97)[0xb774f457]
/usr/lib/i386-linux-gnu/libssl.so.1.0.2(SSL_free+0x11a)[0xb774c4ca]
/usr/local/nagios/libexec/check_nrpe(+0x48c2)[0x4ec8c2]
/usr/local/nagios/libexec/check_nrpe(main+0x11b)[0x4e99eb]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6)[0xb7356286]
/usr/local/nagios/libexec/check_nrpe(+0x1b16)[0x4e9b16]
======= Memory map: ========
004e8000-004f2000 r-xp 00000000 08:01 287522 /usr/local/nagios/libexec/check_nrpe
004f2000-004f3000 r--p 00009000 08:01 287522 /usr/local/nagios/libexec/check_nrpe
004f3000-004f4000 rw-p 0000a000 08:01 287522 /usr/local/nagios/libexec/check_nrpe
004f4000-004f5000 rw-p 00000000 00:00 0 
00c22000-00c64000 rw-p 00000000 00:00 0 [heap]
b7200000-b7221000 rw-p 00000000 00:00 0 
b7221000-b7300000 ---p 00000000 00:00 0 
b7300000-b731c000 r-xp 00000000 08:01 392554 /lib/i386-linux-gnu/libgcc_s.so.1
b731c000-b731d000 r--p 0001b000 08:01 392554 /lib/i386-linux-gnu/libgcc_s.so.1
b731d000-b731e000 rw-p 0001c000 08:01 392554 /lib/i386-linux-gnu/libgcc_s.so.1
b7337000-b7339000 rw-p 00000000 00:00 0 
b7339000-b733c000 r-xp 00000000 08:01 402082 /lib/i386-linux-gnu/libdl-2.24.so
b733c000-b733d000 r--p 00002000 08:01 402082 /lib/i386-linux-gnu/libdl-2.24.so
b733d000-b733e000 rw-p 00003000 08:01 402082 /lib/i386-linux-gnu/libdl-2.24.so
b733e000-b74ef000 r-xp 00000000 08:01 402079 /lib/i386-linux-gnu/libc-2.24.so
b74ef000-b74f1000 r--p 001b0000 08:01 402079 /lib/i386-linux-gnu/libc-2.24.so
b74f1000-b74f2000 rw-p 001b2000 08:01 402079 /lib/i386-linux-gnu/libc-2.24.so
b74f2000-b74f5000 rw-p 00000000 00:00 0 
b74f5000-b750b000 r-xp 00000000 08:01 402085 /lib/i386-linux-gnu/libnsl-2.24.so
b750b000-b750c000 r--p 00016000 08:01 402085 /lib/i386-linux-gnu/libnsl-2.24.so
b750c000-b750d000 rw-p 00017000 08:01 402085 /lib/i386-linux-gnu/libnsl-2.24.so
b750d000-b750f000 rw-p 00000000 00:00 0 
b750f000-b76f7000 r-xp 00000000 08:01 1179146 /usr/lib/i386-linux-gnu/libcrypto.so.1.0.2
b76f7000-b76f8000 ---p 001e8000 08:01 1179146 /usr/lib/i386-linux-gnu/libcrypto.so.1.0.2
b76f8000-b7708000 r--p 001e8000 08:01 1179146 /usr/lib/i386-linux-gnu/libcrypto.so.1.0.2
b7708000-b7711000 rw-p 001f8000 08:01 1179146 /usr/lib/i386-linux-gnu/libcrypto.so.1.0.2
b7711000-b7714000 rw-p 00000000 00:00 0 
b7714000-b7779000 r-xp 00000000 08:01 1179147 /usr/lib/i386-linux-gnu/libssl.so.1.0.2
b7779000-b777a000 ---p 00065000 08:01 1179147 /usr/lib/i386-linux-gnu/libssl.so.1.0.2
b777a000-b777c000 r--p 00065000 08:01 1179147 /usr/lib/i386-linux-gnu/libssl.so.1.0.2
b777c000-b7780000 rw-p 00067000 08:01 1179147 /usr/lib/i386-linux-gnu/libssl.so.1.0.2
b7798000-b779c000 rw-p 00000000 00:00 0 
b779c000-b779e000 r--p 00000000 00:00 0 [vvar]
b779e000-b77a0000 r-xp 00000000 00:00 0 [vdso]
b77a0000-b77c3000 r-xp 00000000 08:01 402075 /lib/i386-linux-gnu/ld-2.24.so
b77c3000-b77c4000 r--p 00022000 08:01 402075 /lib/i386-linux-gnu/ld-2.24.so
b77c4000-b77c5000 rw-p 00023000 08:01 402075 /lib/i386-linux-gnu/ld-2.24.so
bf88a000-bf8ab000 rw-p 00000000 00:00 0 [stack]
Attachments
Capture.JPG
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Post by amprantino »

I faced the same problem after upgrading from NRPE 2.15 to NRPE 3.2.1.

"check_nrpe -n" didnt help at this point .

I had to change the following setting to the NSClient, until I find a better solution (correct TLS settings):

[/settings/NRPE/server]
use ssl = 0
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Post by cocoyanouck »

Thank you for your help !

I tried this solution (use ssl = 0) and relaunched nsclient++ service, but I encountered a new error :
Attachments
Capture.JPG
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Post by cocoyanouck »

Ok, I have uninstalled nagios-nrpe-server and plugin + apt autoremove then I have followed theses instructions :

https://support.nagios.com/kb/article.php?id=515

Step ./configure, I have launched this command :

Code: Select all

./configure --enable-command-args --disable-ssl
Then i have modified all my nsclient.ini with use ssl = 0 (Thank you amprantino).

And ... that's works !...

This is only a solution, but I'm working on this since April, so it will suit me very well :)

Have a good week-end !!! :D
Locked