Could not construct return packet in NRPE handler

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dbsaust
Posts: 76
Joined: Mon Dec 06, 2010 12:41 am

Could not construct return packet in NRPE handler

Post 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.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Could not construct return packet in NRPE handler

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dbsaust
Posts: 76
Joined: Mon Dec 06, 2010 12:41 am

Re: Could not construct return packet in NRPE handler

Post by dbsaust »

Thanks!
I am not authorized to view this topic:
https://support.nagios.com/forum/viewto ... on#p266038

Kindly assist.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Could not construct return packet in NRPE handler

Post 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>
Be sure to check out our Knowledgebase for helpful articles and solutions!
dbsaust
Posts: 76
Joined: Mon Dec 06, 2010 12:41 am

Re: Could not construct return packet in NRPE handler

Post 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!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Could not construct return packet in NRPE handler

Post 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".
Be sure to check out our Knowledgebase for helpful articles and solutions!
dbsaust
Posts: 76
Joined: Mon Dec 06, 2010 12:41 am

Re: Could not construct return packet in NRPE handler

Post by dbsaust »

Thank you for your suggestion!
We will upgrade to latest NSClient++ and after that try again

Cheers!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Could not construct return packet in NRPE handler

Post by lmiltchev »

Let us know if you have any further questions. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked