Antwort: Re: [Nagiosplug-devel] check_dns: DNS WARNING - nslookup returned error status

Andreas Ericsson ae at op5.se
Mon Sep 5 04:10:35 CEST 2005


Ton Voon wrote:
> On 2 Sep 2005, at 16:08, srunschke at abit.de <mailto:srunschke at abit.de> wrote:
> 
>> If it is of any help, I would like to offer to escalate this issue
>> to the RedHat Support. Since we have a dozen support subscribtions
>> for RH Enterprise, I can easily create a ticket and let them solve
>> it for us ;-)
>> I just need some technical description of the problem so that
>> someone not into Nagios would be able to understand it. I'm not
>> sure I could word it properly myself.
> 
> 
> Sascha, 
> 
> I would like to take you up on this offer.
> 
> I've managed to reduce the test case down to the included tar file, so there are 
> no nagios plugins involved. Instructions are:
> 
> gunzip and untar and cd
> make
> ./run_tests 10
> 
> On my RHEL4 server (Red Hat Enterprise Linux version 4 Update 1, 2.6.9-11.EL) , 
> this will fail anywhere between 40% to 70% of the time. Running the same on 
> MacOS10.4.1 and Debian 3.1 gives me 100% success.
> 
> In child_test.c, you can amend the command that is executed. These were the 
> results I got (after 100 runs):
> 
>   - /bin/date 100%
>   - /bin/cat /etc/hosts 100%
>   - /usr/bin/dig redhat.com 69%
>   - /bin/sleep 1 100%
>   - /usr/bin/nslookup redhat.com 90% (after 100 runs), 40% (after 10 runs)
>   - /bin/ping -c 1 localhost 100%
>   - /bin/ping -c 1 192.168.10.32 100%
> 
> So it looks like only DNS resolution stuff is causing problems. Using Peter's 
> trick of waiting for childtermd to be set by the SIGCHLD handler (commented in 
> child_test.c) changes it to 100% success at all times. 
> 
> Definitely looks like a Redhat problem. Can you escalate to them. I think a 
> technical summary could be: "wait() sometimes fails if child executes 
> nslookup/dig command".
> 

More likely, it fails if the child sets any of its filedescriptors to 
non-blocking (including sockets). I remember seeing something about that 
somewhere.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer




More information about the Devel mailing list