CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected

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.
Post Reply
soigan23
Posts: 5
Joined: Wed Apr 12, 2023 10:16 pm

CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected

Post by soigan23 »

After rhel8 to rhel9 update, nagios client is not connecting. Message on ui is:
CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected
ekapsner
Posts: 31
Joined: Wed Mar 05, 2025 2:53 pm

Re: CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected

Post by ekapsner »

Hello @soigan23,

I often see this error when there is an SSL mismatch and the handshake is unable to be completed. If the daemon is expecting SSL to be used and the plugin is used with the --no-ssl or -n flag, then this error is often the result.

What is the result of the following command (if run from the monitoring server)?

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <NRPE address>
- Emmett
soigan23
Posts: 5
Joined: Wed Apr 12, 2023 10:16 pm

Re: CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected

Post by soigan23 »

Hi Emmett,

[root@prod-mon-n1 ~]# /usr/lib64/nagios/plugins/check_nrpe -H prod-nlog-n1
NRPE v4.1.2

[root@prod-mon-n1 ~]# /usr/lib64/nagios/plugins/check_nrpe -n -2 -H prod-nlog-n1
CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected).
[root@prod-mon-n1 ~]#
soigan23
Posts: 5
Joined: Wed Apr 12, 2023 10:16 pm

Re: CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected

Post by soigan23 »

This is fixed by adding
define command {
command_name check_nrpe_v2
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -t 50
}

in /etc/nagios/objects/commands.cfg file

and creating new cfg files in /etc/nagios/objects for upgraded vms and adding these new config files in /etc/nagios/nagios.cfg
ekapsner
Posts: 31
Joined: Wed Mar 05, 2025 2:53 pm

Re: CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected

Post by ekapsner »

Hi @soigan23,

I'm glad you found a fix, because NRPE sometimes has the vaguest error messages. Just for my notes, what did the old command definition for check_nrpe look like?

Thanks,
- Emmett
Post Reply