[Nagiosplug-help] NRPE, check_smtp, and Solaris = mysterious failure

Florin Andrei florin at andrei.myip.org
Wed Apr 6 23:41:01 CEST 2011


I wrote a fake plugin, a shell wrapper that calls check_smtp then dumps 
its stdin and stderr to a debug file, then outputs some fake status to 
please nrpe. Looks like I nailed it:

# cat /tmp/debug
ld.so.1: check_smtp: fatal: libssl.so.0.9.8: open failed: No such file 
or directory
# ldd /usr/local/nagios/libexec/check_smtp
         libnsl.so.1 =>   /lib/libnsl.so.1
         libsocket.so.1 =>        /lib/libsocket.so.1
         libresolv.so.2 =>        /lib/libresolv.so.2
         libssl.so.0.9.8 =>       /usr/local/ssl/lib/libssl.so.0.9.8
         libcrypto.so.0.9.8 =>    /usr/local/ssl/lib/libcrypto.so.0.9.8
         libpthread.so.1 =>       /lib/libpthread.so.1
         libdl.so.1 =>    /lib/libdl.so.1
         libc.so.1 =>     /lib/libc.so.1
         libmp.so.2 =>    /lib/libmp.so.2
         libmd.so.1 =>    /lib/libmd.so.1
         libscf.so.1 =>   /lib/libscf.so.1
         libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
         libdoor.so.1 =>  /lib/libdoor.so.1
         libuutil.so.1 =>         /lib/libuutil.so.1
         libgen.so.1 =>   /lib/libgen.so.1
         libm.so.2 =>     /lib/libm.so.2
# ls -l /usr/local/ssl/lib/
total 8040
drwxr-xr-x   2 bin      bin          512 Jun 25  2009 engines
-rw-r--r--   1 bin      bin      2008548 May 30  2008 libcrypto.a
lrwxrwxrwx   1 root     root          18 Jun 25  2009 libcrypto.so -> 
libcrypto.so.0.9.8
-r-xr-xr-x   1 bin      bin      1432040 May 30  2008 libcrypto.so.0.9.8
-rw-r--r--   1 bin      bin       350324 May 30  2008 libssl.a
lrwxrwxrwx   1 root     root          15 Jun 25  2009 libssl.so -> 
libssl.so.0.9.8
-r-xr-xr-x   1 bin      bin       274656 May 30  2008 libssl.so.0.9.8
drwxr-xr-x   2 bin      bin          512 Jun 25  2009 pkgconfig

This also happens if I run check_smtp manually as the "nagios" user, via 
sudo. Apparently, it only sees that library if it's running as root, 
which is why check_smtp works fine manually as root, but fails when run 
via nrpe (or manually as non-root).

-- 
Florin Andrei
http://florin.myip.org/




More information about the Help mailing list