We are making guesses, so check ulimits.conf Ciao,
Giorgio Il giorno 02/giu/2011, alle ore 15:58, Craig Stewart <[email protected]> ha scritto: > Giorgio, > > It's bash. > > [root@nms tmp]# ls -l /bin/sh > lrwxrwxrwx. 1 root root 4 May 31 11:39 /bin/sh -> bash > [root@nms tmp]# > > I've been doing a bit of reading and it looks like the maximum arguments > is a kernel setting built at compile time. I'm having a hard time > wrapping my head around how the check works when run directly and fails > when called by the Nagios process. > > I'm starting to wonder if I should point the /bin/sh to something like > csh or some such as a test. > > Craig > -- > Craig Stewart > Systems Integration Analyst > [email protected] Tel: (506) 328-1245 Cell: (506) 425-0111 > Xplornet - Broadband, Everywhere > > On 06/02/2011 10:43 AM, Giorgio Zarrelli wrote: >> Check wether your shell is a Dash or a Bash. That means, check where the >> /bin/sh symlink is pointing to. >> >> Ciao, >> >> Giorgio >> >> Il giorno 02/giu/2011, alle ore 14:43, Craig Stewart >> <[email protected]> ha scritto: >> >>> All, >>> >>> SELinux was enabled (DOH!) and has been now disabled. Didn't fix my >>> problem though. Thanks for that Clint, I don't know HOW many times >>> SELinux has bitten me. Should know by now. >>> >>> I ran the strace as suggested by Justin and saw THIS little tidbit >> flash by: >>> >>> 11769 execve("/bin/sh", ["sh", "-c", "/usr/lib/nagios/plugins/check_dig >>> -H 142.166.86.18 -l www.xplornet.com -a 142.166.86.46 -w 0.5 -c 1 -t >>> 5"], [/* 189 vars */]) = -1 E2BIG (Argument list too long) >>> 11751 --- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11769, >>> si_status=127, si_utime=0, si_stime=0} (Child exited) -- >>> >>> Argument list too long???? So, SOMETHING (I suspect the shell) doesn't >>> like that many arguments passed. Well, making progress. >>> >>> By the way, this is a bone stock OS install (Fedora 15 currently) and I >>> haven't tweaked anything. >>> >>> Cheers all! >>> >>> Craig >>> -- >>> Craig Stewart >>> Systems Integration Analyst >>> [email protected] >>> Xplornet - Broadband, Everywhere >>> >>> On 06/01/2011 05:36 PM, Clint Dilks wrote: >>>> Hi >>>> >>>> Just wondering if SE Linux is disabled on your system? If not check >>>> your audit log and see if access to the plugin is being denied >>>> >>>> On Thu, Jun 2, 2011 at 8:15 AM, Justin T Pryzby <[email protected] >>>> <mailto:[email protected]>> wrote: >>>> >>>> You can also strace the main nagios process: >>>> strace -fs999 -e execve -p PID_OF_NAGIOS >>>> or >>>> sudo strace -fs999 -e execve -p `ps o pid h -C nagios3 --sort >>>> start_time |sed q` 2>&1 |grep -Fw execve |grep -Fw check_dig >>>> >>>> 127 is the return status of the shell when a command isn't found: >>>> justinp@justinp:~$ asdf; echo $? >>>> bash: asdf: command not found >>>> 127 >>>> >>>> man sh => /EXIT STATUS/ >>>> >>>> Justin >>>> >>>> On Wed, Jun 01, 2011 at 04:23:05PM -0300, Craig Stewart wrote: >>>>> Giorgio >>>>> >>>>> As apache user: >>>>> >>>>> bash-4.2$ /usr/lib/nagios/plugins/check_dig -H 72.45.111.250 >>>> <tel:72.45.111.250> -l >>>>> www.xplornet.com <http://www.xplornet.com> -a 142.166.86.46 -w 0.5 >>>> -c 1 -t 5 >>>>> DNS OK - 0.096 seconds response time (www.xplornet.com >>>> <http://www.xplornet.com>. 864 IN A >>>>> 142.166.86.46)|time=0.095553s;0.500000;1.000000;0.000000 >>>>> >>>>> >>>>> You understand my confusion. >>>>> >>>>> Craig >>>>> >>>>> Craig Stewart >>>>> Systems Integration Analyst >>>>> [email protected] >>>> <mailto:[email protected] >> <mailto:[email protected]>> Tel: (506) 328-1245 >>>> <tel:%28506%29%20328-1245> Cell: (506) 425-0111 >>>> <tel:%28506%29%20425-0111> >>>>> Xplornet - Broadband, Everywhere >>>>> >>>>> On 06/01/2011 04:18 PM, Giorgio Zarrelli wrote: >>>>>> Hi, >>>>>> >>>>>> I'm curious. Please, do a su - as the apache user and execute >>>> the check >>>>>> as that user. >>>>>> >>>>>> Ciao, >>>>>> >>>>>> Giorgio >>>>> >>>>> >>>> >> ------------------------------------------------------------------------------ >>>>> Simplify data backup and recovery for your virtual environment >>>> with vRanger. >>>>> Installation's a snap, and flexible recovery options mean your >>>> data is safe, >>>>> secure and there when you need it. Data protection magic? >>>>> Nope - It's vRanger. Get your free trial download today. >>>>> http://p.sf.net/sfu/quest-sfdev2dev >>>>> _______________________________________________ >>>>> Nagios-users mailing list >>>>> [email protected] >>>> <mailto:[email protected]> >>>>> 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 >>>>> >>>> >>>> >> ------------------------------------------------------------------------------ >>>> Simplify data backup and recovery for your virtual environment with >>>> vRanger. >>>> Installation's a snap, and flexible recovery options mean your data >>>> is safe, >>>> secure and there when you need it. Data protection magic? >>>> Nope - It's vRanger. Get your free trial download today. >>>> http://p.sf.net/sfu/quest-sfdev2dev >>>> _______________________________________________ >>>> Nagios-users mailing list >>>> [email protected] >>>> <mailto:[email protected]> >>>> 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 >>>> >>>> >>>> >>>> -- >>>> This message has been scanned for viruses and >>>> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is >>>> believed to be clean. >>> >>> >> ------------------------------------------------------------------------------ >>> Simplify data backup and recovery for your virtual environment with >> vRanger. >>> Installation's a snap, and flexible recovery options mean your data is >> safe, >>> secure and there when you need it. Data protection magic? >>> Nope - It's vRanger. Get your free trial download today. >>> http://p.sf.net/sfu/quest-sfdev2dev >>> _______________________________________________ >>> Nagios-users mailing list >>> [email protected] >>> 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 >> >> ------------------------------------------------------------------------------ >> Simplify data backup and recovery for your virtual environment with vRanger. >> Installation's a snap, and flexible recovery options mean your data is safe, >> secure and there when you need it. Data protection magic? >> Nope - It's vRanger. Get your free trial download today. >> http://p.sf.net/sfu/quest-sfdev2dev >> _______________________________________________ >> Nagios-users mailing list >> [email protected] >> 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 >> >> -- >> This message has been scanned by MailScanner >> ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Nagios-users mailing list [email protected] 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
