[Nagiosplug-devel] [ nagiosplug-Bugs-1776916 ] Configure nagios-plugins inside vserver hangs

SourceForge.net noreply at sourceforge.net
Sun Dec 16 10:34:33 CET 2007

Bugs item #1776916, was opened at 2007-08-18 18:12
Message generated for change (Comment added) made by norbertklein
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Compilation
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: norbert (norbertklein)
Assigned to: Nobody/Anonymous (nobody)
Summary: Configure nagios-plugins inside vserver hangs

Initial Comment:
Tested on x86 AMD64

Configure nagios-plugins hangs inside vserver environment (or any other environment without IP as soon as the configure script tries to
check the ICMP syntax.  

Reproducible: Always

Gentoo output:
checking for ps... /bin/ps
checking for ps syntax... /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm 
checking for ping... /bin/ping
checking for ping6... /bin/ping6
checking for ICMP ping syntax...

src_compile aborted; exiting.

The reason is that is hardcoded as localhost IP inside the configure script. This is done for checking ICMP syntax and  nslookup syntax. But
vservers don't have this IP.

The following files contain hardcoded:

I tested these five checks inside a vserver environment and check_dig was the only one which didn't work. As far as I understand the code the reason is that check_dig calls the program dig which fails in case of The others use system calls for their operations.

To fix it I modified configure.in and used the hostname in check_dig.c. I attached a patch for the two mentioned files. For Gentoo you find a modified ebuild below which contains the patchs as well. I tested it on two different Gentoo machines and it worked for me.



>Comment By: norbert (norbertklein)
Date: 2007-12-16 10:34

Logged In: YES 
Originator: YES

Hi Ton

unfortunately you can never be sure that "localhost" or "" is
reachable in a vserver. 
The point is that in the downloadable vserver templates I have seen so
far, the file /etc/hosts always
contains the typical record " localhost". This is obvious because
the actual IP you will use for the vserver is unknown.
If you use localhost in configure.in you assume that the maintainer of the
vserver has set localhost in /etc/hosts to a valid IP.

So maybe the easiest solution is to use localhost as you have suggested
along with a warning or break off if it isn't reachable.
You could additionally add some lines which check the first IP of the
first network interface if
localhost is unavailable.
For ipv6, replacing ::1 with localhost should be the same, the standard
/etc/hosts contains an ipv6 record for localhost and configure.in
handles ipv6 with ping6.



Comment By: Ton Voon (tonvoon)
Date: 2007-12-13 23:28

Logged In: YES 
Originator: NO


Thanks for the report. Would using "localhost" be okay in configure.in?
What impact would this have in IPv4 or IPv6 environments?



You can respond by visiting: 

More information about the Devel mailing list