check nrpe Receive header underflow error

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
ad008
Posts: 2
Joined: Mon Jan 08, 2018 7:05 am

check nrpe Receive header underflow error

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check nrpe Receive header underflow error

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ad008
Posts: 2
Joined: Mon Jan 08, 2018 7:05 am

Re: check nrpe Receive header underflow error

Post 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).
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: check nrpe Receive header underflow error

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
stanrate
Posts: 9
Joined: Thu Feb 15, 2018 7:49 pm

Re: check nrpe Receive header underflow error

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check nrpe Receive header underflow error

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked