NRPE Receive Header Underflow

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
danniiffxi
Posts: 121
Joined: Tue Jan 30, 2018 3:29 am
Location: UK

NRPE Receive Header Underflow

Post 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.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: NRPE Receive Header Underflow

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

Be sure to check out our Knowledgebase for helpful articles and solutions!
danniiffxi
Posts: 121
Joined: Tue Jan 30, 2018 3:29 am
Location: UK

Re: NRPE Receive Header Underflow

Post 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
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: NRPE Receive Header Underflow

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

Be sure to check out our Knowledgebase for helpful articles and solutions!
danniiffxi
Posts: 121
Joined: Tue Jan 30, 2018 3:29 am
Location: UK

Re: NRPE Receive Header Underflow

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRPE Receive Header Underflow

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked