[Nagiosplug-devel] [ nagiosplug-Bugs-1670261 ] SNMP: general child_process = spopen (command_line); problem
SourceForge.net
noreply at sourceforge.net
Sat Mar 28 03:21:12 CET 2009
Bugs item #1670261, was opened at 2007-02-27 19:03
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1670261&group_id=29880
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: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Alex Peeters (zxr750)
Assigned to: Ton Voon (tonvoon)
Summary: SNMP: general child_process = spopen (command_line); problem
Initial Comment:
SNMP problem - No data received from host
check_snmp.c
for testing purpose i did replace
- child_process = spopen (command_line);
with
- child_process = spopen ("/usr/bin/ldd /opt/changed_root/bin/snmpget");
and then you can see the problem
manual test:
export LD_LIBRARY_PATH=/opt/changed_root/lib:/opt/changed_root/ssl/lib
ldd /opt/changed_root/bin/snmpget
libnetsnmp.so.15 => /opt/changed_root/lib/libnetsnmp.so.15
libgen.so.1 => /usr/lib/libgen.so.1
libcrypto.so.0.9.8 => /opt/changed_root/ssl/lib/libcrypto.so.0.9.8
libkstat.so.1 => /usr/lib/libkstat.so.1
libelf.so.1 => /usr/lib/libelf.so.1
libm.so.1 => /usr/lib/libm.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libadm.so.1 => /usr/lib/libadm.so.1
libc.so.1 => /usr/lib/libc.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Fire-V210/lib/libc_psr.so.1
where the generated command from check_snmp.c works fine
/opt/changed_root/bin/snmpget -t 1 -r 5 -m '' -v 2c -c gn1r0t1n0m at notsoc1 10.1.100.50:8196 .1.3.6.1.4.1.140
./check_snmp -P 2c -C gn1r0t1n0m at notsoc1 -H 10.1.100.50 -p 8196 -o .1.3.6.1.4.1.140 -v
/opt/changed_root/bin/snmpget -t 1 -r 5 -m '' -v 2c -c gn1r0t1n0m at notsoc1 10.1.100.50:8196 .1.3.6.1.4.1.140
libnetsnmp.so.15 => (file not found) must be /opt/changed_root/lib
libgen.so.1 => /usr/lib/libgen.so.1
libkstat.so.1 => /usr/lib/libkstat.so.1
libelf.so.1 => /usr/lib/libelf.so.1
libm.so.1 => /usr/lib/libm.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libadm.so.1 => /usr/lib/libadm.so.1
libcrypto.so.0.9.8 => (file not found) must be /opt/changed_root/ssl/lib
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Fire-V210/lib/libc_psr.so.1
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2009-03-28 02:21
Message:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Ton Voon (tonvoon)
Date: 2009-03-14 01:27
Message:
Alex,
I think this is more a problem with your snmpget executable. You can use
crle on Solaris if you want to force /opt/changed_root/ssl/lib to be in the
LD_LIBRARY_PATH.
check_snmp has been converted so it uses a different command run library
so stderr messages will be captured better.
Marking this call in pending, so will auto close in 7 days if there is no
response.
Ton
----------------------------------------------------------------------
Comment By: Alex Peeters (zxr750)
Date: 2007-02-27 20:17
Message:
Logged In: YES
user_id=590764
Originator: YES
Solution added:
Is it possible change the code so that ./configure has a parrameter
LD_LIBRARY_PATH
that then is passed in popen.c please
Ohterwise we need everytime change again your code. Thanks in advance
popen.c
FILE *
spopen (const char *cmdstring)
{
- char *env[2];
+ char *env[3];
env[0] = strdup("LC_ALL=C");
- env[1] = '\0';
+ env[1] =
strdup("LD_LIBRARY_PATH=/opt/changed_root/lib:/opt/changed_root/ssl/lib:/usr/local/lib");
+ env[2] = '\0';
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1670261&group_id=29880
More information about the Devel
mailing list