Page 1 of 1
Could not construct return packet in NRPE handler
Posted: Sat Nov 24, 2018 1:30 am
by dbsaust
After upgrade to latest version Received following message from Nagios:
Could not construct return packet in NRPE handler check client side (nsclient.log) logs...
At host end, nsclient++ logged the following:
error:modules\NRPEListener\NRPEListener.cpp:317: Exception handling NRPE packet: Invalid packet version.
Re: Could not construct return packet in NRPE handler
Posted: Mon Nov 26, 2018 4:15 pm
by cdienger
Newer versions of check_nrpe use version 3 by default and nsclient needs version 2. check_nrpe can be configured to use version 2 using the "-2" option. See
https://support.nagios.com/forum/viewto ... on#p266038 fro steps.
Re: Could not construct return packet in NRPE handler
Posted: Mon Nov 26, 2018 10:35 pm
by dbsaust
Thanks!
I am not authorized to view this topic:
https://support.nagios.com/forum/viewto ... on#p266038
Kindly assist.
Re: Could not construct return packet in NRPE handler
Posted: Tue Nov 27, 2018 12:50 pm
by lmiltchev
I am not authorized to view this topic:
viewtopic.php?f=16&t=50874&p=266038&hilit=Exception+handling+NRPE+packet%3A+Invalid+packet+version#p266038
Sorry about that! This link was provided by mistake. It's from a customer support forum. There is not so much in the thread though - it was just mentioned that depending on the version of the NSClient++, v3 packets may or may not be supported. What is the version of the NSClient++ agent that you are currently using?
Have you tried adding the "-2" option to your check to see if this is going to solve your problem?
Example:
Code: Select all
./check_nrpe -2 -H <ip address> -c <command> -a <arguments>
Re: Could not construct return packet in NRPE handler
Posted: Wed Nov 28, 2018 12:50 am
by dbsaust
Hi @lmiltchev,
NSClient++ Version 2, June 1991
Kindly provide us the full command that we need to execute. Host IP address is 10.215.222.75
Also, is there anything else we need to try if this wouldn't work?
Thanks again!
Re: Could not construct return packet in NRPE handler
Posted: Wed Nov 28, 2018 11:38 am
by lmiltchev
NSClient++ Version 2, June 1991
This is a VERY old version of NSClient++, which won't work with the NRPE v3. You will need to upgrade your NSClient++ agent.
Kindly provide us the full command that we need to execute. Host IP address is 10.215.222.75
I wouldn't know what kind of command you would like to execute, in order to provide you with the "full command"...
The correct syntax would be:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -2 -H 10.215.222.75 -c <command> -a <arguments>
where you substitute <command> with the actual command as defined in the NSClient++ config (NSC.ini or nsclient.ini, depending on the version), and <arguments> with the actual arguments that you are passing.
Note: Passing arguments is optional, depending on how the command is defined. Arguments could be "hard-coded".
Re: Could not construct return packet in NRPE handler
Posted: Wed Nov 28, 2018 10:09 pm
by dbsaust
Thank you for your suggestion!
We will upgrade to latest NSClient++ and after that try again
Cheers!
Re: Could not construct return packet in NRPE handler
Posted: Thu Nov 29, 2018 10:56 am
by lmiltchev
Let us know if you have any further questions. Thanks!