Page 1 of 1
Checking Windows-Updates: CHECK_NRPE: Receive header underfl
Posted: Tue Jun 23, 2020 9:25 am
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?
Re: Checking Windows-Updates: CHECK_NRPE: Receive header und
Posted: Tue Jun 23, 2020 3:02 pm
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.
Re: Checking Windows-Updates: CHECK_NRPE: Receive header und
Posted: Tue Jun 23, 2020 11:28 pm
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

Re: Checking Windows-Updates: CHECK_NRPE: Receive header und
Posted: Wed Jun 24, 2020 2:44 pm
by jbrunkow
It appears that your agent is trying to use an encrypted connection, which means that we should not use the
-n option.
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
Re: Checking Windows-Updates: CHECK_NRPE: Receive header und
Posted: Thu Jun 25, 2020 5:11 am
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).
Re: Checking Windows-Updates: CHECK_NRPE: Receive header und
Posted: Thu Jun 25, 2020 2:15 pm
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.
Re: Checking Windows-Updates: CHECK_NRPE: Receive header und
Posted: Fri Jun 26, 2020 4:44 am
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
Re: Checking Windows-Updates: CHECK_NRPE: Receive header und
Posted: Fri Jun 26, 2020 2:01 pm
by lmiltchev
I'll send the ini and profile shortly
Noted