Checking Windows-Updates: CHECK_NRPE: Receive header underfl

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Nuggel1234
Posts: 23
Joined: Mon May 28, 2018 2:39 am

Checking Windows-Updates: CHECK_NRPE: Receive header underfl

Post by Nuggel1234 »

Hello,
I followed the instructions under:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

and want to monitor the updates on a windows 2019 server.

The script is working on the machine itself.

Command: "./check_nrpe -H [IP of the windows system]" gives me the output "seem to be doing fine"

Now I followed the instructions and run the command "./check_nrpe -H <Remote Windows IP address> -t 120 -p 5666 -c check_updates" with root on the Nagios VM, and get this output:

CHECK_NRPE: Invalid packet version received from server.
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).

The nsclient log says:
2020-06-23 16:14:15: error:c:\source\nscp\include\socket/connection.hpp:149: Failed to send data: The file handle supplied is not valid

NSCLIENT: NSCP-0.4.4.23-x64
Nagios XI 5.7.1 on a virtual machine

No firewall in between
Same IP-Net / Same VLAN

I already changed the timeout in the nsclient.ini, but problem still exists...

Any suggestions?
Or do other ways exist to get alarms, if there are windows updates ready or not installed probably?
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Checking Windows-Updates: CHECK_NRPE: Receive header und

Post by jbrunkow »

This may be because of an incompatibility between versions of your check plugin and agent. You could add the -2 option to the check command to force it to use a version 2 packet. Please see the following linked knowledge base article for more information on this.
NOT SUPPORTED PACKETS

Is the address SSL encrypted? ( HTTP or HTTPS ) If not, you may want to use the -n option so that it doesn't try to make an encrypted connection.

Can you please send us ( PM ) or post your *.ini file and/or system profile? 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!
Nuggel1234
Posts: 23
Joined: Mon May 28, 2018 2:39 am

Re: Checking Windows-Updates: CHECK_NRPE: Receive header und

Post by Nuggel1234 »

That's the output for -2 / -n option

[root@XXXXXX libexec]# ./check_nrpe -2 -n -H XXX.XXX.XXX.XXX -t 120 -p 5666 -c check_updates
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
[root@XXXXXX libexec]#


log from nsclient:

2020-06-24 06:20:45: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: unknown protocol: 252
2020-06-24 06:20:53: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: unknown protocol: 252
2020-06-24 06:20:53: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: unknown protocol: 252
2020-06-24 06:22:01: error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: unknown protocol: 252
2020-06-24 06:23:04: error:c:\source\nscp\include\socket/connection.hpp:149: Failed to send data: The file handle supplied is not valid
2020-06-24 06:24:49: error:c:\source\nscp\include\socket/connection.hpp:149: Failed to send data: The file handle supplied is not valid

I send a PM with the two files.

Thanks :)
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Checking Windows-Updates: CHECK_NRPE: Receive header und

Post by jbrunkow »

It appears that your agent is trying to use an encrypted connection, which means that we should not use the -n option.

Code: Select all

use ssl = 1
check_nrpe must be using version three or later protocol then. Apparently the main difference between version two and three of NRPE is that the packet size was limited to 1024 bytes.

You can force NSClient++ to accept larger packet sizes by defining the payload length as follows in the NRPE section of your nsclient.ini file.

Code: Select all

[/settings/NRPE/server]
payload length=8192
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!
Nuggel1234
Posts: 23
Joined: Mon May 28, 2018 2:39 am

Re: Checking Windows-Updates: CHECK_NRPE: Receive header und

Post by Nuggel1234 »

changed the ini / restarted the client but it didn't worked

[root@xxxxx libexec]# ./check_nrpe -2 -H xxxxxxxxx -t 120 -p 5666 -c check_updates
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Checking Windows-Updates: CHECK_NRPE: Receive header und

Post by jbrunkow »

I apologize if I wasn't more clear, but I believe you should remove the -2 flag on the command. Can you please try it again without the -2 flag?

Feel free to send me ( PM ) the *.ini file and your system profile so that I can take a look. 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!
Nuggel1234
Posts: 23
Joined: Mon May 28, 2018 2:39 am

Re: Checking Windows-Updates: CHECK_NRPE: Receive header und

Post by Nuggel1234 »

CHECK_NRPE: Invalid packet version received from server.
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).


I'll send the ini and profile shortly
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Checking Windows-Updates: CHECK_NRPE: Receive header und

Post by lmiltchev »

I'll send the ini and profile shortly
Noted
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked