Page 1 of 1

NRPE V4 in ubuntu 20.04, does not work but NRPE V3 does ?

Posted: Wed Aug 11, 2021 10:25 am
by hubs
Hi

I am running Nagios core V4.4.6,with the latest plugins. I have recently been upgrading some of my Ubuntu servers to 20.04 from 18.04, which seems to upgrade NRPE from V3.2.1 to V4, I can then see all the checks on that host start to fail.

On my Nagios Core Server each service shows "(No output on stdout) stderr: corrupted size vs. prev_size"

On the Client in the NRPE log messages in syslog I see "nrpe[5626]: Error: (use_ssl == true): Request packet version was invalid!
nrpe[5626]: Could not read request from client 192.168.20.220, bailing out...
nrpe[5626]: INFO: SSL Socket Shutdown"


Server IP is 192.168.20.220 for info

If I copy the nrpe binary V3 from an 18.04 server to /usr/sbin on the 20.04 server the issue is resolved.

I have the latest version of Core and the plugins so you would assume that it should be fine. I spent hours googling looking for a fix, but no joy.

Anyone have any ideas why this is happening with NRPE V4 ?

Re: NRPE V4 in ubuntu 20.04, does not work but NRPE V3 does

Posted: Wed Aug 11, 2021 4:49 pm
by gormank
Try adding -2 or --v2-packets-only to the check_nrpe plugin commands.

Re: NRPE V4 in ubuntu 20.04, does not work but NRPE V3 does

Posted: Thu Aug 12, 2021 7:10 am
by hubs
Thanks very much for your help, that resolved the issue !! You a star !

added the -2 to the check_nrpe command in commands.cfg as below and boom all services started to come back up!

# .check_nrpe. command definition
define command{
command_name check_nrpe
command_line /usr/lib/nagios/plugins/check_nrpe -2 -H $HOSTADDRESS$ -c $ARG1$
}

Strange thing is when I google this all there is, is posts of people having to apply this to the V3 NRPE config, which I did not have to do but obviously have to for V4 NRPE binary.

Many thanks again.

Re: NRPE V4 in ubuntu 20.04, does not work but NRPE V3 does

Posted: Thu Aug 19, 2021 5:19 pm
by benjaminsmith
Hi,

Great. Glad to hear that's working now. Thank you @gormank!

We'll go ahead and mark this as resolved.