Return code of 9 is out of bounds when plugin is runin nagios, but return code is 0 when run from shell

Andreas Ericsson ae at op5.se
Wed Sep 14 12:21:46 CEST 2011


On 09/14/2011 08:16 AM, Samuel Kidman wrote:
> The script is called from the nagios server itself, NRPE isn't involved.
> It's really frustrating as I can't seem to find any source for the error
> and I can't think of anymore troubleshooting steps or ways to repeat the
> error outside of Nagios. Is there some way I can get more detail on why
> this code is getting returned by using debugging options in nagios.cfg?
> 

$ errid 9
  9  EBADF            Bad file descriptor

This means it's somehow related to filedescriptors. All plugins share
the number of open filedescriptors with Nagios, so if many plugins run
at the same time and the plugin is opening a lot of files or making a
lot of socket connections, you might end up with it breaking from
something like this.

Does the plugin return proper output or do you get the Nagios-generated
one?

Does it always break or only sometimes?

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list