Page 1 of 1
check nrpe Receive header underflow error
Posted: Mon Jan 08, 2018 7:14 am
by ad008
Hello,
I am trying to setup nagios monitoring and i have installed nagios core in one server and nrpe in another. When i try to execute a command using nrpe from core server i get the below error
CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected)
if i run the same command in my remote client i get the correct output.
WARNING - load average per CPU: 0.19, 0.17, 0.16|load1=0.190;0.150;0.300;0; load5=0.170;0.100;0.250;0; load15=0.158;0.050;0.200;0;
nrpe version i am using is 3.2.1 and plugins 2.2.1
I looked up and saw it may be related to enable-command-args while compiling. I had done ./configure -enable-command-args while installation.
Re: check nrpe Receive header underflow error
Posted: Mon Jan 08, 2018 4:06 pm
by npolovenko
Hello,
@ad008. This could be the packet version issue. Please attempt to run the command from the Nagios Core server with
-2. Take a look at the example below:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -2 -H 192.168.1.1
Replace my address with the remote server IP address.
Re: check nrpe Receive header underflow error
Posted: Tue Jan 09, 2018 3:29 am
by ad008
npolovenko wrote:Hello,
@ad008. This could be the packet version issue. Please attempt to run the command from the Nagios Core server with
-2. Take a look at the example below:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -2 -H 192.168.1.1
Replace my address with the remote server IP address.
HI,
I am still getting the same error.
/usr/local/nagios/libexec/check_nrpe -2 -H 10.114.8.225
CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected).
Re: check nrpe Receive header underflow error
Posted: Tue Jan 09, 2018 12:23 pm
by lmiltchev
Are you running the same version of NRPE (3.2.1) on both, your nagios server, and the remote machine? Have you added the nagios server's IP address to the nrpe.cfg (or /etc/xinetd.d/nrpe) file?
Please run the following commands on the nagios server from the command line, and show the output:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.114.8.225
/usr/local/nagios/libexec/check_nrpe -H 10.114.8.225 -n
nmap 10.114.8.225 -p 5666
Do you see any clues in the system log on your remote machine after you execute the check_nrpe against 10.114.8.225? Please show us the relevant section of your system log (or the entire log) from the remote box.
Re: check nrpe Receive header underflow error
Posted: Wed Feb 21, 2018 7:49 pm
by stanrate
I got the same error i.e. following message was output once or twice:
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
when I ran the following command a few hundred times:
/usr/lib64/nagios/plugins/check_nrpe -H xxxx -c xxxx -a xxxx
I suspect it's caused by a bug in nrpe.c that was introduced when the code was changed to cater for the new V3 record format.
Re: check nrpe Receive header underflow error
Posted: Thu Feb 22, 2018 5:58 pm
by npolovenko
@stanrate, Can you show us the actual command you're running? And also the command definition from the remote server? Did you run the commands suggested by
@lmiltchev?
If you think it's a bug you can open a new issue on our GitHub page:
https://github.com/nagios-plugins/nagio ... issues/new