Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 457042

Summary: net-analyzer/nagios-plugins check_rpc plugin missing dependency
Product: Gentoo Linux Reporter: Andrew Hamilton <andrew>
Component: [OLD] ServerAssignee: Michael Orlitzky <mjo>
Severity: normal CC: sysadmin
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: add net-nds/rpcbind to DEPEND

Description Andrew Hamilton 2013-02-13 07:01:05 UTC
the check_rpc plugin requires /sbin/rpcinfo which is a part of net-nds/rpcbind.

Note that the nagios-plugins build system looks for rpcinfo to be installed in order to set the path in /usr/lib/nagios/plugins/ If rpcinfo is not already installed, this will default to /usr/sbin/rpcinfo.  Therefore, rpcbind probably needs to be a DEPEND (not RDEPEND) of nagios-plugins.

Reproducible: Always

Steps to Reproduce:
1. emerge net-analyzer/nagios-plugins on a system that does not have rpcbind
2. attempt to use /usr/lib/nagios/plugins/check_rpc to monitor an RPC service
3. eg: /usr/lib/nagios/plugins/check_rpc -H nfsserver -C nfs -v
Actual Results:  
Can't fork for rpcinfo: No such file or directory

Expected Results:  
/sbin/rpcinfo  -u nfs-mail 100003  2>&1 |
program 100003 version 2 ready and waiting
 1: version 2
program 100003 version 3 ready and waiting
 1: version 2 version 3
OK: RPC program nfs version 2 version 3 udp running

Portage 2.2.0_alpha161 (default/linux/amd64/13.0, gcc-4.5.3, glibc-2.15-r3, 3.0.0-kvm x86_64)
System uname: Linux-3.0.0-kvm-x86_64-QEMU_Virtual_CPU_version_1.0,1-with-gentoo-2.2
KiB Mem:     2002420 total,    141912 free
KiB Swap:     262140 total,    245908 free
Timestamp of tree: Tue, 12 Feb 2013 04:15:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo tjcsl
CFLAGS="-O2 -pipe"
CONFIG_PROTECT="/etc /var/rancid/.cloginrc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news noclean parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersync"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="acl amd64 bash-completion berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gnutls gpm hal iconv ipv6 mhash mmx modules mudflap multilib ncurses nls nptl openmp pam pcre readline session sse sse2 ssl syslog tcpd threads unicode vim-syntax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Comment 1 Andrew Hamilton 2013-02-13 07:02:13 UTC
Created attachment 338746 [details, diff]
add net-nds/rpcbind to DEPEND

patch adding net-nds/rpcbind to DEPEND for net-analyzer/nagios-plugins
Comment 2 Michael Orlitzky gentoo-dev 2014-11-23 15:18:10 UTC
I can sort of confirm this one, since it definitely checks for rpcinfo in the ./configure script. But for some reason it doesn't find mine, even with rpcbind installed, and even if I specify the path explicitly:

  $ ./configure --with-rpcinfo-command=/sbin/rpcinfo


  configure:22711: checking for rpcinfo
  configure:22744: result: no

argh. It is there:

  $ sudo /sbin/rpcinfo
  rpcinfo: can't contact rpcbind...

If I could get that part working, adding another local 'rpc'USE flag should help with the automagic dependency.
Comment 3 Michael Orlitzky gentoo-dev 2017-08-03 12:55:56 UTC
There's a long chain of weirdness related to this bug.

First, there's a bug in the nagios-plugins build system that prevents --with-rpcinfo-command from working.

Second, the fact that rpcinfo isn't found by default is because it's not in /usr/bin, which is because net-nds/rpcbind uses --bindir=/usr/sbin.

It does *that* because net-nds/rpcbind installs both of its executables to the "bindir" even though one of them is superuser-only.

I sent a patch upstream:

If that gets merged, our rpcbind package can go back to installing "rpcinfo" into /usr/bin, and nagios-plugins will pick it up automatically. At that point I should be able to test and fix this!
Comment 4 Larry the Git Cow gentoo-dev 2018-01-20 17:29:51 UTC
The bug has been referenced in the following commit(s):

commit d21091ab12da59df78633ca800900d6e622042a2
Author:     Michael Orlitzky <>
AuthorDate: 2018-01-20 17:21:19 +0000
Commit:     Michael Orlitzky <>
CommitDate: 2018-01-20 17:22:22 +0000

    net-nds/rpcbind: use default values for "--bindir" and "--with-rpcuser"
    Upstream commit 9afccfc moves the rpcbind executable from the bindir
    to the sbindir, meaning that we don't have to override the bindir in
    our ebuild if we want rpcbind installed to e.g. /usr/sbin. This commit
    drops the "--bindir" flag from src_configure, so the default will be
    used. As a side effect, this will place the rpcinfo executable in the
    bindir where it belongs, allowing us to fix things like bug 457042.
    Our ebuild was also passing "--with-rpcuser=root" explicitly, even
    though that is the default value. This commit removes the redundancy.
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-nds/rpcbind/rpcbind-9999.ebuild | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)}
Comment 5 Michael Orlitzky gentoo-dev 2018-10-18 01:59:18 UTC
rpcbind-1.2.5 is finally in the tree with the fix for this
Comment 6 Michael Orlitzky gentoo-dev 2019-11-05 17:45:52 UTC
Aaaaand rpcbind-1.25 is now stable.