Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44382 - nagios-plugins ebuild hangs indefinitely which checking /bin/ping during configure
Summary: nagios-plugins ebuild hangs indefinitely which checking /bin/ping during conf...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Netmon Herd
URL:
Whiteboard:
Keywords:
: 186069 209754 253011 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-11 11:48 UTC by Joe Reeves
Modified: 2011-11-22 10:32 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for the nagios-plugins ebuild (nagios-plugins-1.3.1.ebuild.patch,447 bytes, patch)
2004-03-11 11:54 UTC, Joe Reeves
Details | Diff
Vserver patch, modifies configure.in and check_dig.c (nagios-plugins-1.4.9-localhostip.patch,4.19 KB, patch)
2007-07-29 15:38 UTC, Norbert Klein
Details | Diff
Vserver ebuild patch (nagios-plugins-1.4.9.ebuild.patch,301 bytes, patch)
2007-07-29 15:39 UTC, Norbert Klein
Details | Diff
with this nagios-plugins-1.4.13-r1 can be installed on a vserver guest (nagios-plugins-1.4.13-vserver.patch,3.43 KB, patch)
2009-02-26 21:24 UTC, Ivan Chavero
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Reeves 2004-03-11 11:48:16 UTC
Since fping was already a dependency for this ebuild, I had a hunch that the ebuild script was using the wrong ping. I've modified the ebuild to use the correct program 'fping' and would like to submit a patch.

Reproducible: Always
Steps to Reproduce:
1.emerge sync
2.emerge nagios-plugins
3.

Actual Results:  
ebuild performs all configure checks up until the checking /bin/ping. It will
then sit there until (end_of_time|interrupt).

Expected Results:  
emerged the nagios-plugins ebuild

Here's the patch to the ebuild file:

--- nagios-plugins-1.3.1.ebuild.old     2004-03-11 13:42:14.000000000 -0600
+++ nagios-plugins-1.3.1.ebuild 2004-03-11 13:34:17.000000000 -0600
@@ -43,10 +43,11 @@ src_compile() {
                --host=${CHOST} \
                --prefix=/usr/nagios \
                --with-nagios-user=nagios \
                --sysconfdir=/etc/nagios \
                --infodir=/usr/share/info \
+               --with-ping-command=/usr/sbin/fping \
                --mandir=/usr/share/man || die "./configure failed"
        make || die
 }
  
 src_install() {
Comment 1 Joe Reeves 2004-03-11 11:54:42 UTC
Created attachment 27217 [details, diff]
Patch for the nagios-plugins ebuild

tested and confirmed to be working with version 1.3.1 of nagios-plugins ebuild.
Comment 2 Michael Boman (RETIRED) gentoo-dev 2004-03-12 22:24:04 UTC
I belive that there is something different between your build enviroment versus a standard stable x86 enviroment, as I can't reproduce your problem.

From the ./configure part during "ebuild compile":

[...]
checking for ping... /bin/ping
      ping syntax... /bin/ping -n -U -c <count> <host>
[...]

I am also against making 'fping' the default ping command. That is what "check_fping" is for.

Please feedback anything that might be different between your build enviroment versus a clean x86 build enviroment.
Comment 3 Michael Boman (RETIRED) gentoo-dev 2004-03-21 07:57:22 UTC
If no additional information is provided I am inclined to mark this bug as RESOLVED->WORKSFORME, as I have no problem at all merging the ebuild.
Comment 4 Michael Boman (RETIRED) gentoo-dev 2004-03-29 01:27:57 UTC
I can't reproduce this bug, and no further feedback was recived what could cause the difference in the build environment.
Comment 5 Benedikt Böhm (RETIRED) gentoo-dev 2004-11-20 01:04:37 UTC
i can verify this... it happens in a stable gentoo environment inside a www.linux-vserver.org
Comment 6 Benedikt Böhm (RETIRED) gentoo-dev 2004-11-23 10:35:02 UTC
i noticed this happend because this gentoo runs inside a www.linux-vserver.org which has no 127.0.0.1 so the test in configure fails...
Comment 7 FieldySnuts 2005-03-17 10:25:09 UTC
I am seeing this problem right now. I'm not in a huge hurry to get this working, so I may be able to dig around and help figure out what's up. Though I'm not sure where to start.

In addition, in logs I see a pretty steady flood of:

    printk: 4 messages suppressed.
    source route option 127.0.0.1 -> 127.0.0.1

Which stopped when I killed off the merge. I have never seen that error before.


Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.11-grsec i686)
=================================================================
System uname: 2.6.11-grsec i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#2, Feb  9 2005, 09:25:10)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.22-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=pentium3 -O2 -pipe -fstack-protector"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=pentium3 -O2 -pipe -fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ ftp://gentoo.ccccom.com"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 apache2 apm arts avi berkdb bitmap-fonts cdr chroot crypt curl emboss encode font-server foomaticdb fortran gdbm gif gpm imagemagick imlib kde kerberos ldap libg++ libwww mad mikmod mmxncurses motif mp3 mpeg ncurses oggvorbis opengl pam pdflib perl pwdb python qt quicktime readline samba sdl snmp spell ssl tcpd truetype truetype-fonts type1-fonts xml2 xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 8 FieldySnuts 2005-12-12 09:31:08 UTC
I am still seeing this problem... What is the solution? This is blocking me from
installing nagios.
Comment 9 FieldySnuts 2005-12-12 09:37:06 UTC
Updated emerge info

Portage 2.0.51.22-r3 (default-linux/x86/2005.0, gcc-3.3.5, glibc-2.3.5-r0,
2.6.14.3-grsec-20051129 i686)
=================================================================
System uname: 2.6.14.3-grsec-20051129 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mcpu=pentium3 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=pentium3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://adelie.polymtl.ca/
ftp://cs.ubishops.ca/pub/gentoo ftp://gentoo.risq.qc.ca/
ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 apache2 apm audiofile avi berkdb bitmap-fonts bzip2 cdr chroot crypt
curl eds emboss encode ethereal expat fam foomaticdb fortran gd gdbm gif gmp gpm
gstreamer idn imagemagick imlib kde kerberos libg++ libwww mad mhash mikmod
mmxncurses motif mp3 mpeg ncurses ogg oggvorbis pam pcre pdflib perl pwdb python
qt quicktime readline samba sdl snmp spell ssl tcpd truetype truetype-fonts
type1-fonts udev vorbis xml2 xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 10 Lance Albertson (RETIRED) gentoo-dev 2005-12-12 11:21:12 UTC
Do you have any iptable rules that would deny allowing ping on 127.0.0.1? I
recall the configure script does a ping on 127.0.0.1 and if it can't do that, it
will fail.
Comment 11 FieldySnuts 2005-12-12 11:53:31 UTC
Wow, nice catch Lance! Yes, that did it. It would be nice if the configure 
script screamed out that it would fail if that could not be done. 
 
Thanks a lot! Chalk it up to what I find is a rather goofy configure script. 
Comment 12 Lance Albertson (RETIRED) gentoo-dev 2005-12-12 12:15:04 UTC
(In reply to comment #11)
> Wow, nice catch Lance! Yes, that did it. It would be nice if the configure 
> script screamed out that it would fail if that could not be done. 

No problem :-)

> Thanks a lot! Chalk it up to what I find is a rather goofy configure script. 

I might try adding a die line commenting on this type of problem during the
configure phase. Hopefully that might catch bugs like this.
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 06:37:56 UTC
*** Bug 186069 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 06:38:36 UTC
This was never really fixed.
Comment 15 Norbert Klein 2007-07-21 07:08:58 UTC
127.0.0.1 can also be found in the source of some of the checks. Probabely these must be fixed as well. I will try to create some patches for the concerned files.
Comment 16 Norbert Klein 2007-07-29 14:54:15 UTC
The following files contain 127.0.0.1 hardcoded:
configure.in
check_dig.c
check_pgsql.c
check_smtp.c
check_tcp.c
check_ups.c

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 127.0.0.1.
The others use system calls for their operations.

You find a modified ebuild below which contains a patch for configure.in
and check_dig.c. I tested it on two different machines and it worked
for me, so that Nagios could be installed via portage inside the vservers. 
But I am not a developer, so please use it with care.

http://www.acodedb.com/download/linux/nagios-plugins.tgz
Comment 17 Tobias Scherbaum (RETIRED) gentoo-dev 2007-07-29 15:02:20 UTC
Thanks for your patch!. Please attach diffs to ebuilds and patches to this bug, this makes it much easier to track made changes.

I lack a vserver setup to test this patch and this bug isn't in any way related to our way of packaging the nagios-plugins - can you please move this patch directly to the upstream authors? Getting this fixed upstream would make much more sense imho.
Comment 18 Norbert Klein 2007-07-29 15:38:55 UTC
Created attachment 126349 [details, diff]
Vserver patch, modifies configure.in and check_dig.c
Comment 19 Norbert Klein 2007-07-29 15:39:56 UTC
Created attachment 126351 [details, diff]
Vserver ebuild patch
Comment 20 Norbert Klein 2007-07-29 15:46:04 UTC
Ok, yes that's propably the best solution. I forwarded it to the Nagios Plugin Team.(In reply to comment #17)
Comment 21 Tobias Scherbaum (RETIRED) gentoo-dev 2007-08-17 00:17:48 UTC
(In reply to comment #20)
> Ok, yes that's propably the best solution. I forwarded it to the Nagios Plugin
> Team.(In reply to comment #17)
> 

Any feedback yet? I'm marking this bug as RESOLVED/UPSTREAM for now. Feel free to reopen once they've accepted the patches and/or commented on it.
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2008-02-12 08:16:17 UTC
*** Bug 209754 has been marked as a duplicate of this bug. ***
Comment 23 Tobias Scherbaum (RETIRED) gentoo-dev 2009-01-05 12:57:31 UTC
*** Bug 253011 has been marked as a duplicate of this bug. ***
Comment 24 Ivan Chavero 2009-02-26 21:24:17 UTC
Created attachment 183304 [details, diff]
with this nagios-plugins-1.4.13-r1 can be installed on a vserver guest

I took the time to create a patch for nagios-plugins-1.4.13-r1 based on the previous posted patches. I hope it can be useful to someone
Comment 25 Tobias Scherbaum (RETIRED) gentoo-dev 2010-03-16 16:39:56 UTC
(In reply to comment #24)
> Created an attachment (id=183304) [details]
> with this nagios-plugins-1.4.13-r1 can be installed on a vserver guest
> 
> I took the time to create a patch for nagios-plugins-1.4.13-r1 based on the
> previous posted patches. I hope it can be useful to someone
> 

Added to nagios-plugins-1.4.14-r2.
Comment 26 Reuben Farrelly 2010-03-24 12:39:00 UTC
This patch breaks nagios-plugins for me.  After attempting to upgrade to 1.4.14-r2, the ping check component of the autotools execution now fails:

checking return type of socket size... int
checking for ps... /bin/ps
checking for ps syntax... /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args'
checking for ping... /bin/ping
checking for ping6... /bin/ping6
checking for ICMP ping syntax... configure: WARNING: unable to find usable ping syntax
checking for ICMPv6 ping syntax... /bin/ping6 -n -U -w %d -c %d %s
checking for nslookup... /usr/bin/nslookup
checking for nslookup syntax... /usr/bin/nslookup -sil

The end result is that the check_ping plugin compiles, but fails on execution with "CRITICAL - You need more args!!!"

After reverting to 1.4.14 everything works again.

FWIW:

tornado # /sbin/ifconfig | egrep "inet addr:" | sed -n '1p' | sed 's/ Bcast.*$//' | sed 's/^\s*inet addr://'
127.0.0.1  Mask:255.0.0.0
tornado # 

Is the fact that the Mask: is set for first_ip a problem?

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1

Comment 27 David Sparks 2010-10-01 00:36:00 UTC
(In reply to comment #26)
> This patch breaks nagios-plugins for me.

bug 311723 and bug 338247 have more info on this.

http://bugs.gentoo.org/show_bug.cgi?id=311723

http://bugs.gentoo.org/show_bug.cgi?id=338247