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 »

I think I have already tried it before, but if i try again :

root@nagios-vz:/tmp# cd nrpe-3.2.1
root@nagios-vz:/tmp/nrpe-3.2.1# ./configure --enable-command-args --enable-ssl
checking for a BSD-compatible install... /usr/bin/install -c
checking what the operating system is ... linux
checking what the distribution type is ... debian
checking what init system is being used ... systemd
checking what inetd is being used ... xinetd
checking for which paths to use ... default
checking for which init file to use ... default-service
checking for which inetd files to use ... default-xinetd
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdint.h... (cached) yes
checking for strings.h... (cached) yes
checking for string.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking tcpd.h usability... no
checking tcpd.h presence... no
checking for tcpd.h... no
checking for unistd.h... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for sys/wait.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking size of int... 4
checking size of short... 2
checking size of long... 4
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int32_t... yes
checking for struct sockaddr_storage... yes
checking for seteuid... yes
checking for va_copy... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for asprintf... yes
checking for vasprintf... yes
checking for C99 vsnprintf... yes
checking for getopt_long... yes
checking for main in -lnsl... yes
checking for socket in -lsocket... no
checking for main in -lwrap... no
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for strtok_r... yes
checking for initgroups... yes
checking for closesocket... no
checking for sigaction... yes
checking for scandir... yes
checking for socklen_t... yes
checking for type of socket size... size_t
checking for Kerberos include files... configure: WARNING: could not find include files
checking for pkg-config... pkg-config
checking whether compiling and linking against SSL works... yes
checking for openssl... /usr/bin/openssl

*** Generating DH Parameters for SSL/TLS ***
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
...................................................................................................................................................................................
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating nrpe.spec
config.status: creating uninstall
config.status: creating sample-config/nrpe.cfg
config.status: creating startup/bsd-init
config.status: creating startup/debian-init
config.status: creating startup/default-init
config.status: creating startup/default-inetd
config.status: creating startup/default-service
config.status: creating startup/default-socket
config.status: creating startup/default-socket-svc
config.status: creating startup/default-xinetd
config.status: creating startup/mac-init.plist
config.status: creating startup/mac-inetd.plist
config.status: creating startup/newbsd-init
config.status: creating startup/openbsd-init
config.status: creating startup/openrc-conf
config.status: creating startup/openrc-init
config.status: creating startup/solaris-init.xml
config.status: creating startup/solaris-inetd.xml
config.status: creating startup/tmpfile.conf
config.status: creating startup/upstart-init
config.status: creating startup/rh-upstart-init
config.status: creating include/common.h
config.status: creating include/config.h


*** Configuration summary for nrpe 3.2.1 2017-09-01 ***:

General Options:
-------------------------
NRPE port: 5666
NRPE user: nagios
NRPE group: nagios
Nagios user: nagios
Nagios group: nagios


Review the options above for accuracy. If they look okay,
type 'make all' to compile the NRPE daemon and client
or type 'make' to get a list of make options.

root@nagios-vz:/tmp/nrpe-3.2.1# make all
cd ./src/; make
make[1] : on entre dans le répertoire « /tmp/nrpe-3.2.1/src »
gcc -g -O2 -DHAVE_CONFIG_H -I ../include -I ./../include -o nrpe ./nrpe.c ./utils.c ./acl.c -lssl -lcrypto -lnsl
gcc -g -O2 -DHAVE_CONFIG_H -I ../include -I ./../include -o check_nrpe ./check_nrpe.c ./utils.c -lssl -lcrypto -lnsl
make[1] : on quitte le répertoire « /tmp/nrpe-3.2.1/src »

*** Compile finished ***

You can now continue with the installation or upgrade process.

Read the PDF documentation (docs/NRPE.pdf) for information on the next
steps you should take to complete the installation or upgrade.

root@nagios-vz:/tmp/nrpe-3.2.1# make install
cd ./src/; make install
make[1] : on entre dans le répertoire « /tmp/nrpe-3.2.1/src »
make install-plugin
make[2] : on entre dans le répertoire « /tmp/nrpe-3.2.1/src »
/usr/bin/install -c -m 755 -d /usr/local/nagios/bin
/usr/bin/install -c -m 755 ../uninstall /usr/local/nagios/bin/nrpe-uninstall
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios check_nrpe /usr/local/nagios/libexec
make[2] : on quitte le répertoire « /tmp/nrpe-3.2.1/src »
make install-daemon
make[2] : on entre dans le répertoire « /tmp/nrpe-3.2.1/src »
/usr/bin/install -c -m 755 -d /usr/local/nagios/bin
/usr/bin/install -c -m 755 ../uninstall /usr/local/nagios/bin/nrpe-uninstall
/usr/bin/install -c -m 755 nrpe /usr/local/nagios/bin
/usr/bin/install -c -m 755 -d /usr/lib/tmpfiles.d
/usr/bin/install -c -m 644 ../startup/tmpfile.conf /usr/lib/tmpfiles.d/nrpe.conf
make[2] : on quitte le répertoire « /tmp/nrpe-3.2.1/src »
make[1] : on quitte le répertoire « /tmp/nrpe-3.2.1/src »
root@nagios-vz:/tmp/nrpe-3.2.1# make install-config
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 644 -o nagios -g nagios sample-config/nrpe.cfg /usr/local/nagios/etc
root@nagios-vz:/tmp/nrpe-3.2.1# make install-init
/usr/bin/install -c -m 644 startup/default-service /lib/systemd/system/nrpe.service
root@nagios-vz:/tmp/nrpe-3.2.1# systemctl enable nrpe.service
root@nagios-vz:/tmp/nrpe-3.2.1# systemctl enable nrpe.service
root@nagios-vz:/tmp/nrpe-3.2.1# vi /usr/local/nagios/etc/nrpe.cfg
root@nagios-vz:/tmp/nrpe-3.2.1# systemctl start nrpe.service
root@nagios-vz:/tmp/nrpe-3.2.1# cd /usr/local/nagios/libexec/
root@nagios-vz:/usr/local/nagios/libexec# ./check_nrpe -H 10.30.2.38
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with 10.30.2.38: 1
root@nagios-vz:/usr/local/nagios/libexec# ./check_nrpe -n -H 10.30.2.38
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).

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

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

Post by tgriep »

Is the Nagios server at IP address 10.0.2.130?

Edit the nsclient.ini file and change this line from

Code: Select all

allow nasty characters = 1
to

Code: Select all

allow nasty characters = true
And under this section

Code: Select all

[/settings/NRPE/server]
Add this line (the option is suppose to be blank)

Code: Select all

ssl options = 
Save the file and restart the NSClient++ agent on the windows system and retest it.

If it fails, take a look in the nsclient.log file on the windows system and post the errors that are generated when the check_nrpe fails.
Be sure to check out our Knowledgebase for helpful articles and 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 »

Yes that's right.

nsclient.ini modified.

nsclient.log file :

Code: Select all

2018-04-30 11:46:27: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 11:48:21: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 11:56:28: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 11:58:21: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 12:06:27: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 12:08:22: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 12:16:27: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 12:18:21: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 12:26:28: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 12:28:22: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 12:36:27: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 12:38:22: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-04-30 12:39:29: debug:c:\source\0.5.1\service\logger\nsclient_logger.cpp:52: Creating logger: threaded-file
2018-04-30 12:39:50: error:c:\source\0.5.1\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

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

Post by tgriep »

I found this link on the NRPE github site and it looks like the issue is that the size of the Diffie-Hellman (DH) key that the newer NRPE plugin is using is not compatible with the NSClietx++ agent.
See this link below and the entry from Nov 28, 2017 has a fix.
https://github.com/NagiosEnterprises/nrpe/issues/173

Or the other option that worked for me is to install version 3.0.1 of the pre-compiled check_nrpe plugin by running the following.

Code: Select all

apt install nagios-nrpe-plugin
And then use this plugin.

Code: Select all

/usr/lib/nagios/plugins/check_nrpe
Let us know if you have any other questions.
Be sure to check out our Knowledgebase for helpful articles and 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 »

Awesome !!! Thank you very much !

Ok, so the second solution is not working for me, but I think there is a mistake somewhere :

root@nagios-vz:/home/nagios# apt install nagios-nrpe-plugin
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
nagios-nrpe-plugin is already the newest version (3.0.1-3+deb9u1).
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
root@nagios-vz:/home/nagios# cd /usr/lib/nagios/plugins/
root@nagios-vz:/usr/lib/nagios/plugins# ls
check_nrpe nrpe.tar.gz
root@nagios-vz:/usr/lib/nagios/plugins# ./check_nrpe -H 10.30.2.38
*** Error in `./check_nrpe': corrupted size vs. prev_size: 0x01c59170 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x6738a)[0xb736338a]
/lib/i386-linux-gnu/libc.so.6(+0x6dfc7)[0xb7369fc7]
/lib/i386-linux-gnu/libc.so.6(+0x6f082)[0xb736b082]
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.2(CRYPTO_free+0x33)[0xb75141b3]
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.2(BN_clear_free+0x72)[0xb754bf42]
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.2(DH_free+0x102)[0xb757de22]
/usr/lib/i386-linux-gnu/libssl.so.1.0.2(+0x3a03a)[0xb770c03a]
/usr/lib/i386-linux-gnu/libssl.so.1.0.2(SSL_SESSION_free+0x97)[0xb770d457]
/usr/lib/i386-linux-gnu/libssl.so.1.0.2(SSL_free+0x11a)[0xb770a4ca]
./check_nrpe(+0x48c2)[0x4178c2]
./check_nrpe(main+0x11b)[0x4149eb]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6)[0xb7314286]
./check_nrpe(+0x1b16)[0x414b16]
======= Memory map: ========
00413000-0041d000 r-xp 00000000 08:01 11304764 /usr/lib/nagios/plugins/check_n rpe
0041d000-0041e000 r--p 00009000 08:01 11304764 /usr/lib/nagios/plugins/check_n rpe
0041e000-0041f000 rw-p 0000a000 08:01 11304764 /usr/lib/nagios/plugins/check_n rpe
0041f000-00420000 rw-p 00000000 00:00 0
01c38000-01c7a000 rw-p 00000000 00:00 0 [heap]
b7100000-b7121000 rw-p 00000000 00:00 0
b7121000-b7200000 ---p 00000000 00:00 0
b72be000-b72da000 r-xp 00000000 08:01 8126570 /lib/i386-linux-gnu/libgcc_s.so .1
b72da000-b72db000 r--p 0001b000 08:01 8126570 /lib/i386-linux-gnu/libgcc_s.so .1
b72db000-b72dc000 rw-p 0001c000 08:01 8126570 /lib/i386-linux-gnu/libgcc_s.so .1
b72f5000-b72f7000 rw-p 00000000 00:00 0
b72f7000-b72fa000 r-xp 00000000 08:01 8127333 /lib/i386-linux-gnu/libdl-2.24. so
b72fa000-b72fb000 r--p 00002000 08:01 8127333 /lib/i386-linux-gnu/libdl-2.24. so
b72fb000-b72fc000 rw-p 00003000 08:01 8127333 /lib/i386-linux-gnu/libdl-2.24. so
b72fc000-b74ad000 r-xp 00000000 08:01 8127328 /lib/i386-linux-gnu/libc-2.24.s o
b74ad000-b74af000 r--p 001b0000 08:01 8127328 /lib/i386-linux-gnu/libc-2.24.s o
b74af000-b74b0000 rw-p 001b2000 08:01 8127328 /lib/i386-linux-gnu/libc-2.24.s o
b74b0000-b74b3000 rw-p 00000000 00:00 0
b74b3000-b74c9000 r-xp 00000000 08:01 8127337 /lib/i386-linux-gnu/libnsl-2.24 .so
b74c9000-b74ca000 r--p 00016000 08:01 8127337 /lib/i386-linux-gnu/libnsl-2.24 .so
b74ca000-b74cb000 rw-p 00017000 08:01 8127337 /lib/i386-linux-gnu/libnsl-2.24 .so
b74cb000-b74cd000 rw-p 00000000 00:00 0
b74cd000-b76b5000 r-xp 00000000 08:01 11273000 /usr/lib/i386-linux-gnu/libcryp to.so.1.0.2
b76b5000-b76b6000 ---p 001e8000 08:01 11273000 /usr/lib/i386-linux-gnu/libcryp to.so.1.0.2
b76b6000-b76c6000 r--p 001e8000 08:01 11273000 /usr/lib/i386-linux-gnu/libcryp to.so.1.0.2
b76c6000-b76cf000 rw-p 001f8000 08:01 11273000 /usr/lib/i386-linux-gnu/libcryp to.so.1.0.2
b76cf000-b76d2000 rw-p 00000000 00:00 0
b76d2000-b7737000 r-xp 00000000 08:01 11273001 /usr/lib/i386-linux-gnu/libssl. so.1.0.2
b7737000-b7738000 ---p 00065000 08:01 11273001 /usr/lib/i386-linux-gnu/libssl. so.1.0.2
b7738000-b773a000 r--p 00065000 08:01 11273001 /usr/lib/i386-linux-gnu/libssl. so.1.0.2
b773a000-b773e000 rw-p 00067000 08:01 11273001 /usr/lib/i386-linux-gnu/libssl. so.1.0.2
b7756000-b775a000 rw-p 00000000 00:00 0
b775a000-b775c000 r--p 00000000 00:00 0 [vvar]
b775c000-b775e000 r-xp 00000000 00:00 0 [vdso]
b775e000-b7781000 r-xp 00000000 08:01 8127324 /lib/i386-linux-gnu/ld-2.24.so
b7781000-b7782000 r--p 00022000 08:01 8127324 /lib/i386-linux-gnu/ld-2.24.so
b7782000-b7783000 rw-p 00023000 08:01 8127324 /lib/i386-linux-gnu/ld-2.24.so
bff93000-bffb4000 rw-p 00000000 00:00 0 [stack]
Abandon

I will read and try the first option.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

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

Post by tgriep »

I would remove the package nagios-nrpe-plugin from the system.
Verify that the plugin is gone from the /usr/lib/nagios/plugins/ folder.
If not, delete it then reinstall the nagios-nrpe-plugin package and test it again.
It could be a incompatible package causing the plugin to fail so hopefully reinstalling the package solves the issue.
Be sure to check out our Knowledgebase for helpful articles and 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 »

I'm really sorry to make you waste your time :(
I have removed nagios-nrpe-plugin but this is not working !

root@nagios-vz:/home/nagios# apt-get remove nagios-nrpe-plugin
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Le paquet « nagios-nrpe-plugin » n'est pas installé, et ne peut donc être suppri mé
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
root@nagios-vz:/home/nagios# cd /usr/lib/nagios/plugins
bash: cd: /usr/lib/nagios/plugins: Aucun fichier ou dossier de ce type
root@nagios-vz:/tmp# apt install nagios-nrpe-plugin
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Les NOUVEAUX paquets suivants seront installés :
nagios-nrpe-plugin
0 mis à jour, 1 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 0 o/31,6 ko dans les archives.
Après cette opération, 77,8 ko d'espace disque supplémentaires seront utilisés.
Sélection du paquet nagios-nrpe-plugin précédemment désélectionné.
(Lecture de la base de données... 149251 fichiers et répertoires déjà installés. )
Préparation du dépaquetage de .../nagios-nrpe-plugin_3.0.1-3+deb9u1_i386.deb ...
Dépaquetage de nagios-nrpe-plugin (3.0.1-3+deb9u1) ...
Paramétrage de nagios-nrpe-plugin (3.0.1-3+deb9u1) ...
root@nagios-vz:/tmp# cd /usr/lib/nagios/plugins/
root@nagios-vz:/usr/lib/nagios/plugins# ls
check_nrpe
root@nagios-vz:/usr/lib/nagios/plugins# ./check_nrpe -H 10.30.2.38
*** Error in `./check_nrpe': corrupted size vs. prev_size: 0x01b95170 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x6738a)[0xb739138a]
/lib/i386-linux-gnu/libc.so.6(+0x6dfc7)[0xb7397fc7]
/lib/i386-linux-gnu/libc.so.6(+0x6f082)[0xb7399082]
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.2(CRYPTO_free+0x33)[0xb75421b3]
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.2(BN_clear_free+0x72)[0xb7579f42]
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.2(DH_free+0x102)[0xb75abe22]
/usr/lib/i386-linux-gnu/libssl.so.1.0.2(+0x3a03a)[0xb773a03a]
/usr/lib/i386-linux-gnu/libssl.so.1.0.2(SSL_SESSION_free+0x97)[0xb773b457]
/usr/lib/i386-linux-gnu/libssl.so.1.0.2(SSL_free+0x11a)[0xb77384ca]
./check_nrpe(+0x48c2)[0x4dc8c2]
./check_nrpe(main+0x11b)[0x4d99eb]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6)[0xb7342286]
./check_nrpe(+0x1b16)[0x4d9b16]
======= Memory map: ========
004d8000-004e2000 r-xp 00000000 08:01 917543 /usr/lib/nagios/plugins/check_n rpe
004e2000-004e3000 r--p 00009000 08:01 917543 /usr/lib/nagios/plugins/check_n rpe
004e3000-004e4000 rw-p 0000a000 08:01 917543 /usr/lib/nagios/plugins/check_n rpe
004e4000-004e5000 rw-p 00000000 00:00 0
01b74000-01bb6000 rw-p 00000000 00:00 0 [heap]
b71e2000-b71fe000 r-xp 00000000 08:01 8126570 /lib/i386-linux-gnu/libgcc_s.so .1
b71fe000-b71ff000 r--p 0001b000 08:01 8126570 /lib/i386-linux-gnu/libgcc_s.so .1
b71ff000-b7200000 rw-p 0001c000 08:01 8126570 /lib/i386-linux-gnu/libgcc_s.so .1
b7200000-b7221000 rw-p 00000000 00:00 0
b7221000-b7300000 ---p 00000000 00:00 0
b7323000-b7325000 rw-p 00000000 00:00 0
b7325000-b7328000 r-xp 00000000 08:01 8127333 /lib/i386-linux-gnu/libdl-2.24. so
b7328000-b7329000 r--p 00002000 08:01 8127333 /lib/i386-linux-gnu/libdl-2.24. so
b7329000-b732a000 rw-p 00003000 08:01 8127333 /lib/i386-linux-gnu/libdl-2.24. so
b732a000-b74db000 r-xp 00000000 08:01 8127328 /lib/i386-linux-gnu/libc-2.24.s o
b74db000-b74dd000 r--p 001b0000 08:01 8127328 /lib/i386-linux-gnu/libc-2.24.s o
b74dd000-b74de000 rw-p 001b2000 08:01 8127328 /lib/i386-linux-gnu/libc-2.24.s o
b74de000-b74e1000 rw-p 00000000 00:00 0
b74e1000-b74f7000 r-xp 00000000 08:01 8127337 /lib/i386-linux-gnu/libnsl-2.24 .so
b74f7000-b74f8000 r--p 00016000 08:01 8127337 /lib/i386-linux-gnu/libnsl-2.24 .so
b74f8000-b74f9000 rw-p 00017000 08:01 8127337 /lib/i386-linux-gnu/libnsl-2.24 .so
b74f9000-b74fb000 rw-p 00000000 00:00 0
b74fb000-b76e3000 r-xp 00000000 08:01 11273000 /usr/lib/i386-linux-gnu/libcryp to.so.1.0.2
b76e3000-b76e4000 ---p 001e8000 08:01 11273000 /usr/lib/i386-linux-gnu/libcryp to.so.1.0.2
b76e4000-b76f4000 r--p 001e8000 08:01 11273000 /usr/lib/i386-linux-gnu/libcryp to.so.1.0.2
b76f4000-b76fd000 rw-p 001f8000 08:01 11273000 /usr/lib/i386-linux-gnu/libcryp to.so.1.0.2
b76fd000-b7700000 rw-p 00000000 00:00 0
b7700000-b7765000 r-xp 00000000 08:01 11273001 /usr/lib/i386-linux-gnu/libssl. so.1.0.2
b7765000-b7766000 ---p 00065000 08:01 11273001 /usr/lib/i386-linux-gnu/libssl. so.1.0.2
b7766000-b7768000 r--p 00065000 08:01 11273001 /usr/lib/i386-linux-gnu/libssl. so.1.0.2
b7768000-b776c000 rw-p 00067000 08:01 11273001 /usr/lib/i386-linux-gnu/libssl. so.1.0.2
b7784000-b7788000 rw-p 00000000 00:00 0
b7788000-b778a000 r--p 00000000 00:00 0 [vvar]
b778a000-b778c000 r-xp 00000000 00:00 0 [vdso]
b778c000-b77af000 r-xp 00000000 08:01 8127324 /lib/i386-linux-gnu/ld-2.24.so
b77af000-b77b0000 r--p 00022000 08:01 8127324 /lib/i386-linux-gnu/ld-2.24.so
b77b0000-b77b1000 rw-p 00023000 08:01 8127324 /lib/i386-linux-gnu/ld-2.24.so
bfa49000-bfa6a000 rw-p 00000000 00:00 0 [stack]
Abandon
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

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

Post by tgriep »

I did a little searching on the error message "corrupted size vs. prev_size" and one of the possible issues is that the nagios-nrpe-plugin package may have been compiled with a different version of glibc.
Can you update to the latest glibc on that system and see if it allows the plugin to run?

This are the versions I have installed on my system.

Code: Select all

nagios-nrpe-plugin/stable,now 3.0.1-3+deb9u1 amd64 [installed]
libc6/stable,now 2.24-11+deb9u3 amd64 [installed]
libc6-dev/stable,now 2.24-11+deb9u3 amd64 [installed,automatic]
The plugin version

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -V

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 require
The plugin connecting to NSClient++ installed on a Windows 7 system

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H 192.168.5.223
I (0.5.2.35 2018-01-28) seem to be doing fine...
System information

Code: Select all

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
Linux debian9x64 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u1 (2017-06-18) x86_64 GNU/Linux
Be sure to check out our Knowledgebase for helpful articles and 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 »

Hum, could you send me the commands to let me recover all the informations in order to post it here ?

By the way, nagios nrpe is on 3.0.1
libc6 and libc6-dev => 2.24-11+deb9u3
I just have updated NSCLIENT++ 0.5.1 to 0.5.2.35 (but same issue)
Debian 9 Stretch x64

Have a good WE.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

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

Post by tgriep »

Here are the commands I ran to get the information for the NRPE plugin and the libc version.

Code: Select all

apt list  --installed |grep nrpe
apt list  --installed |grep libc6
This is what I ran to get the System Information.

Code: Select all

uname -a
cat /etc/*release*
You can try and update and upgrade the packages on your system.

Try this as root.

Code: Select all

apt update
apt upgrade
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked