Non obvious 127 plugin error
Giorgio Zarrelli
zarrelli at linux.it
Thu Jun 2 15:43:44 CEST 2011
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 <Craig.Stewart at corp.xplornet.com> 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
> Craig.Stewart at corp.xplornet.com
> 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 <justinp at norchemlab.com
>> <mailto:justinp at norchemlab.com>> 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 at 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
>>> Craig.Stewart at corp.xplornet.com
>> <mailto:Craig.Stewart at corp.xplornet.com> 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
>>> Nagios-users at lists.sourceforge.net
>> <mailto: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
>>>
>>
>> ------------------------------------------------------------------------------
>> 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
>> Nagios-users at lists.sourceforge.net
>> <mailto: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
>>
>>
>>
>> --
>> 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
> 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
------------------------------------------------------------------------------
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
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