Nagios returns error "(Return code of 127 is out of bounds"

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
LeftyF
Posts: 5
Joined: Thu Nov 07, 2013 2:35 pm

Nagios returns error "(Return code of 127 is out of bounds"

Post by LeftyF »

I am running Nagios on an Amazon Centos instance. I have installed Nagios 3.5.1 via yum. On a dead stock install I'm getting the "(Return code of 127 is out of bounds - plugin may be missing)" error on the localhost host configuration (stock). I had tried to migrate in my host configurations from a 3.2.3 instance but was getting the same error, so I removed Nagios and started again from scratch only to get this error. This seems to be for the check_http check command as this is the only plugin called by the localhost configuration. I have confirmed that the plugin is in the default path of /usr/local/nagios/libexec/check_http. I put Nagios into debug mode and the output of the checks looks like:

[1443633730.155627] [2048.1] [pid=11604] Done. Final output: '/usr/lib64/nagios/plugins/check_http -I http://www.oldmoonguitars.com '
[1443633730.155632] [2048.1] [pid=11604] **** END MACRO PROCESSING *************
[1443633730.155808] [2048.1] [pid=11604] **** BEGIN MACRO PROCESSING ***********
[1443633730.155817] [2048.1] [pid=11604] Processing: '$USER1$/check_http -I $HOSTADDRESS$ $ARG1$'
[1443633730.155826] [2048.1] [pid=11604] Done. Final output: '/usr/lib64/nagios/plugins/check_http -I pi2 '
[1443633730.155830] [2048.1] [pid=11604] **** END MACRO PROCESSING *************
[1443633740.164766] [2048.1] [pid=11604] **** BEGIN MACRO PROCESSING ***********
[1443633740.164777] [2048.1] [pid=11604] Processing: '$USER1$/check_http -I $HOSTADDRESS$ $ARG1$'
[1443633740.164786] [2048.1] [pid=11604] Done. Final output: '/usr/lib64/nagios/plugins/check_http -I http://www.oldmoonguitars.com '
[1443633740.164790] [2048.1] [pid=11604] **** END MACRO PROCESSING *************

I've searched hi and lo but following the threads and documented troubleshooting has yielded no solution.

Any help would be much appreciated!
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Nagios returns error "(Return code of 127 is out of boun

Post by jdalrymple »

Your $USER1$ in resource.cfg is set to /usr/lib64/nagios/plugins

Adjust it - you need it to be set as /usr/local/nagios/libexec - it may break other things...
LeftyF
Posts: 5
Joined: Thu Nov 07, 2013 2:35 pm

Re: Nagios returns error "(Return code of 127 is out of boun

Post by LeftyF »

Got it - thank you! The build from yum is broken out of the box apparently. We ended up installing an RPM of 3.5.1 which worked as installed. I knew it was a path somewhere that was causing it but could not track it down.

Thanks again for the response
Locked