Page 1 of 1

Return code 107

Posted: Wed Mar 05, 2014 2:58 pm
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?

Re: Return code 107

Posted: Wed Mar 05, 2014 3:24 pm
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.

Re: Return code 107

Posted: Wed Mar 05, 2014 3:37 pm
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.

Re: Return code 107

Posted: Wed Mar 05, 2014 3:46 pm
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.

Re: Return code 107

Posted: Wed Mar 05, 2014 4:31 pm
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!