Return code 107

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Return code 107

Post by BanditBBS »

I have some cisco telepresence devices and I am using this awesome plugin created by this great guy, BanditBBS, so I know it can't be his code, that are causing me a small headache.

Every once in a while I get this:

Code: Select all

CRITICAL: Return code of 107 is out of bounds. (worker: svwdcnetmg02.aeo.ae.com)
I've searched and searched and either that return code isn't talked about anywhere or my google skills are failing again.

Anyone have any hints for me?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Return code 107

Post by tmcdonald »

You might wanna slap that BanditBBS guy with a trout, cuz his code doesn't seem to properly check for a closed connection:

http://stackoverflow.com/questions/9000 ... conn-error
http://www-numi.fnal.gov/offline_softwa ... rrors.html (grep for ENOTCONN)

Just my theory. If it turns out to be correct I can always slap him for you to save you the hassle.
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Return code 107

Post by BanditBBS »

Dangit...why did it have to be Trevor that found that!

That makes sense, seeing as I'm making a ton of snmp calls and I m.....to heck with explaining, guess I have a code revision to work on. Thanks for finding that link.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Return code 107

Post by tmcdonald »

BanditBBS wrote:Dangit...why did it have to be Trevor that found that!
Eh, it was a longshot but the Core code was revealing:

Code: Select all

asprintf(&temp_service->plugin_output, "(Return code of %d is out of bounds%s)", queued_check_result->return_code, [...]
Basically whatever error code you see is the exit code from the plugin. For most of the core plugins we will see 127 (plugin may be missing) and 126 (may not be executable) in the case of errors. In your case of 107 it was just a matter of looking up standard Unix error codes.
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Return code 107

Post by BanditBBS »

I just couldn't find those standard exit codes, no matter what I search for :(

Anyway, bug fix in place and sending to exchange now. My script will now report UNKNOWN instead of critical if the connection closes on its own and show the session error(I think). Close this thread up!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked