Page 1 of 1

NRPE Receive Header Underflow

Posted: Wed Aug 26, 2020 10:05 am
by danniiffxi
Hi Guys

Any idea why this is happening?

So this is our Nagios Network Analyzer server being monitored from Nagios XI.

Running on current Production server XI 5.6.14 CentOS 6

Code: Select all

[nagios@nagip01 ~]$ /usr/local/nagios/libexec/check_nrpe -H NAGIP03 -t 30 -c check_init_service -a 'crond'
crond (pid 2429) is running...
Running on new (Soon to be) Production server XI 5.7.2 CentOS 7

Code: Select all

[nagios@nagxit01 ~]$ /usr/local/nagios/libexec/check_nrpe -H NAGIP03 -2 -t 30 -c check_init_service -n -a 'crond'
CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected).
I believe the error to be something on the Network Analyzer server but I can't pinpoint where.

Re: NRPE Receive Header Underflow

Posted: Thu Aug 27, 2020 2:32 pm
by jbrunkow
What happens if you run the command without the -n option? When using -n, I believe it is necessary to specify the same on the agent as well.

The issue you are encountering may be related to the following bug reported on GitHub. This was the most relevant thing I could find online.
CHECK_NRPE: Unclear error message during SSL mismatch

I'm not totally sure if this is related, but you may also want to take a look at the following knowledgebase article. It details the difference between NRPE versions, specifically packet size.
NRPE - v3 Compatibility With Previous Versions

This may be a bug, but to confirm I will need more information. Can you please provide me with your Nagios Network Analyzer version? Did you install an agent on it? A profile may also come in handy. You can download the profile by navigating to System Profile under System Config on the left pane > and clicking the Download Profile button on that page.

Re: NRPE Receive Header Underflow

Posted: Fri Aug 28, 2020 7:13 am
by danniiffxi
Here is with and without -n, -n needed for SSL negotiation or i get a connection refusal. The annoying part is that it was working fine before we installed SSL certs on the servers, ow it is running over HTTPS this has cropped up.

Code: Select all

[root@nagxit01 ~]# /usr/local/nagios/libexec/check_nrpe -H NAGIP03 -2 -t 30 -c check_init_service -n -a 'crond'
CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected).

Code: Select all

[root@nagxit01 ~]# /usr/local/nagios/libexec/check_nrpe -H NAGIP03 -2 -t 30 -c check_init_service -a 'crond'
CHECK_NRPE: Error - Could not connect to 172.31.87.45: Connection reset by peer
I'll have a look though the URLs you attached and report back later, many thanks

Re: NRPE Receive Header Underflow

Posted: Fri Aug 28, 2020 2:06 pm
by jbrunkow
Wait, so are you trying to SSL encrypt the connection or not?
-n, --no-ssl Do not use SSL
The -n option is for not using SSL encryption. If this is your intention, you should specify -n on the agent as well.

If your intention is to encrypt the connection, you should not use the -n option. You may also have to pass other arguments depending on what type of connection the agent is expecting.

Submit the command with the -h option to see all options and their usage.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -h
Have a look at the readme page about it to see more detailed information about configuring SSL/TLS for NRPE.
NRPE With SSL/TLS

Re: NRPE Receive Header Underflow

Posted: Wed Sep 02, 2020 5:13 am
by danniiffxi
Hi this is now fixed, please lock.

Thanks for you help jbrunkow -n was part of the problem, the other the new Nagios servers IP was not in the nrpe config on the host machine.

Re: NRPE Receive Header Underflow

Posted: Wed Sep 02, 2020 7:15 am
by scottwilkerson
danniiffxi wrote:Hi this is now fixed, please lock.

Thanks for you help jbrunkow -n was part of the problem, the other the new Nagios servers IP was not in the nrpe config on the host machine.
Great!

Locking thread