Hi, we had the same problem and tried to solve it with limits.d but it doesn't seem to work when nagios starts from the init script.<div><br></div><div>So we added ulimits commands to the init script and it works.</div>
<div><br></div><div><div><div># Set limits for openfiles and processes as it is not inherited from limits.d</div><div>ulimit -H -n 131072</div><div>ulimit -S -n 131072</div><div><br></div><div>ulimit -H -u 16384</div>
<div>
ulimit -S -u 16384</div></div><div><br></div><div>Cheers,</div><div>Ian O</div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 6, 2012 at 10:03 AM, Mike W <span dir="ltr"><<a href="mailto:uce_mike@yahoo.com" target="_blank">uce_mike@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I have been working to try and resolve a problem I am having with<br>
commands.conf entries (check_* commands). The full discussion I have had<br>
with more detailed notes is here:<br>
<br>
<a href="http://support.nagios.com/forum/viewtopic.php?f=7&t=8200" target="_blank">http://support.nagios.com/forum/viewtopic.php?f=7&t=8200</a><br>
<br>
One of the members suggested at this point I should post to the devel list.<br>
<br>
The short version is this. I am getting "Warning: Return code of 127 for<br>
check of service" in the nagios.log. After enabling debug logs I further<br>
ran the command manually as user nagios and it ran fine (no permissions<br>
errors or missing script as normal indicated by 127 error).<br>
<br>
End result seems to be the problem is max open files. Normally this<br>
would be fixed by increasing these in /etc/security/limits.conf for user<br>
nagios which we did (and rebooted). However this did not resolve the<br>
problem. I created a check script at that point to output ulimit -a and<br>
it repeatedly showed that the max was still 1024 even tho we had set it<br>
to a greater value.<br>
<br>
As I said, manually su'ing to nagios and running the script things<br>
worked fine. ulimit -a also showed the proper value. It seems to only be<br>
an issue when it is run from nagios.<br>
<br>
We are running on RHEL 6.2, using Nagios 3.4.3RC1, nagios-plugins 1.4.16.<br>
<br>
The full steps I took are listed in the support forums but if you have<br>
questions for me I would be more than happy to answer them. At this<br>
point I am at a loss as to what this could be.<br>
<br>
--<br>
<br>
Mike Wilson<br>
<br>
------------------------------------------------------------------------------<br>
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial<br>
Remotely access PCs and mobile devices and provide instant support<br>
Improve your efficiency, and focus on delivering more value-add services<br>
Discover what IT Professionals Know. Rescue delivers<br>
<a href="http://p.sf.net/sfu/logmein_12329d2d" target="_blank">http://p.sf.net/sfu/logmein_12329d2d</a><br>
_______________________________________________<br>
Nagios-devel mailing list<br>
<a href="mailto:Nagios-devel@lists.sourceforge.net">Nagios-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-devel</a><br>
</blockquote></div><br></div></div>