[Nagiosplug-devel] check_dns: DNS WARNING - nslookup returned error status
Dag Wieers
dag at wieers.com
Thu Sep 1 12:45:22 CEST 2005
Hi,
We noticed a problem on some systems due to the fact that the
process was already exited when issuing spclose() and spclose() didn't
check this properly (followed by a non-zero return code, generating a
warning). Causing the plugin to variably return:
DNS WARNING - nslookup returned error status
This seems to be system-dependent (load/kernel scheduler). On RHEL3 we
didn't see this, but with RHEL4's 2.6 kernel it happened frequently.
I noticed this is also reported on Sourceforge's bugtracker at:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1250191&group_id=29880
where they check if the process has already finished.
This would fix similar problems with check_dig and probably other checks,
where you get warning messages as well, like:
DNS WARNING - 0.008 seconds response time (servername. 600 IN A 1.2.3.4)|time=0.008382s;;;0.000000
This is a pretty urgent bug imo, warranting a new release ?
Kind regards,
-- dag wieers, dag at wieers.com, http://dag.wieers.com/ --
[all I want is a warm bed and a kind word and unlimited power]
-------------- next part --------------
--- nagios-plugins-1.4.1/plugins/popen.c.orig 2005-08-02 13:44:47.631761141 +0200
+++ nagios-plugins-1.4.1/plugins/popen.c 2005-08-02 13:52:24.589616713 +0200
@@ -221,8 +221,13 @@
return (1);
while (waitpid (pid, &status, 0) < 0)
+ {
+ if (errno == ECHILD)
+ return (0); /* Child has already exited */
+
if (errno != EINTR)
return (1); /* error other than EINTR from waitpid() */
+ }
if (WIFEXITED (status))
return (WEXITSTATUS (status)); /* return child's termination status */
More information about the Devel
mailing list