NagiosEnterprises / nrpe

NRPE Agent
GNU General Public License v2.0
259 stars 133 forks source link

"Remote <host> does not support version 3/4 packets" logging with both check_nrpe & nrpe 4.0.0 #224

Closed sebastic closed 4 years ago

sebastic commented 4 years ago

When using NRPE v4.0.0 on both sides Remote <host> does not support version 3/4 packets is logged.

This can reproduced locally:

$ /usr/lib/nagios/plugins/check_nrpe --version
NRPE Plugin for Nagios
Version: 4.0.0

$ /usr/sbin/nrpe -V
NRPE - Nagios Remote Plugin Executor
Version: 4.0.0

# date && /usr/lib/nagios/plugins/check_nrpe -H localhost -4 ; grep "check_nrpe: Remote 127.0.0.1" /var/log/syslog
Wed 22 Jan 2020 11:49:17 AM CET
NRPE v4.0.0
Jan 22 11:49:17 foobar check_nrpe: Remote 127.0.0.1 does not support version 3/4 packets
Jan 22 11:49:17 foobar check_nrpe: Remote 127.0.0.1 accepted a version 2 packet

With debug enabled in nrpe.cfg, the logging shows:

Jan 22 12:01:43 foobar nrpe[1889]: CONN_CHECK_PEER: checking if host is allowed: 127.0.0.1 port 26767
Jan 22 12:01:43 foobar nrpe[1889]: Connection from 127.0.0.1 port 26767
Jan 22 12:01:43 foobar nrpe[1889]: is_an_allowed_host (AF_INET): is host >127.0.0.1< an allowed host >127.0.0.1<
Jan 22 12:01:43 foobar nrpe[1889]: is_an_allowed_host (AF_INET): host is in allowed host list!
Jan 22 12:01:43 foobar nrpe[1889]: Host address is in allowed_hosts
Jan 22 12:01:43 foobar nrpe[1889]: Error: Request packet had invalid CRC32.
Jan 22 12:01:43 foobar nrpe[1889]: Client request from 127.0.0.1 was invalid, bailing out...
Jan 22 12:01:43 foobar nrpe[1889]: Connection from 127.0.0.1 closed.
Jan 22 12:01:43 foobar check_nrpe: Remote 127.0.0.1 does not support version 3/4 packets
Jan 22 12:01:43 foobar nrpe[1891]: CONN_CHECK_PEER: checking if host is allowed: 127.0.0.1 port 27279
Jan 22 12:01:43 foobar nrpe[1891]: Connection from 127.0.0.1 port 27279
Jan 22 12:01:43 foobar nrpe[1891]: is_an_allowed_host (AF_INET): is host >127.0.0.1< an allowed host >127.0.0.1<
Jan 22 12:01:43 foobar nrpe[1891]: is_an_allowed_host (AF_INET): host is in allowed host list!
Jan 22 12:01:43 foobar nrpe[1891]: Host address is in allowed_hosts
Jan 22 12:01:43 foobar nrpe[1891]: Host 127.0.0.1 is asking for command '_NRPE_CHECK' to be run...
Jan 22 12:01:43 foobar nrpe[1891]: Response to 127.0.0.1: NRPE v4.0.0
Jan 22 12:01:43 foobar nrpe[1891]: Return Code: 0, Output: NRPE v4.0.0
Jan 22 12:01:43 foobar nrpe[1891]: Connection from 127.0.0.1 closed.
Jan 22 12:01:43 foobar check_nrpe: Remote 127.0.0.1 accepted a version 2 packet

CHANGELOG.md recommended to upgrade both for best results, but the new packet format is not actually used.

sebastic commented 4 years ago

This seems the be the same issue as reported in #223.

sawolf commented 4 years ago

Thanks for reporting this, continuing discussion in the other issue.