[ First - *please* don't mail me privately, without copying
     any responses to the mailing list.  I don't have the time
     or inclination to offer private, unpaid, SNMP consultancy.
     Keep discussions to the list, where others can both learn
     and offer advice.  Thanks.   ]



2009/6/25 liusd_sheldon <[email protected]>:
> Hi  Dave,
>       Thanks a lot for your answer.
>       As you said, It actually starts a agent binary comes with the original
> O/S(monta vista linux 3.1). And when I try to run my agent using a full
> path. First time, it reports  lots of error as follows and  can not run.
> [email protected]:/usr/local/net-snmp/sbin# ./snmpd -f -Le -d -c
> /usr/share/snmp
> /snmpd.conf &
> [1] 122
> [email protected]:/usr/local/net-snmp/sbin# netsnmp_assert !"registration !=
> duplicate" failed agent_registry.c:535 netsnmp_subtree_load()
> netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
> netsnmp_subtree_load()
> netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
> netsnmp_subtree_load()
> Oops: kernel access of bad area, sig: 11
> NIP: 00000000 XER: 00000000 LR: C00B5BA4 SP: C6F41CC0 REGS: c6f41c10 TRAP:
> 0400    Not tainted
> MSR: 20001032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
> TASK = c6f40000[122] 'snmpd' Last syscall: 54
> last math c6f40000 last altivec 00000000
> GPR00: 00000000 C6F41CC0 C6F40000 C7740000 00000000 00000004 C6F41DF0
> 00000000
> GPR08: 00000000 00000000 FFFF8946 C0100368 24000488 101C2AAC 00000000
> 10190000
> GPR16: 10170000 102081E8 10190000 10190000 00009032 06F41F40 00000000
> C0005C54
> GPR24: C00059C0 00000006 C6F41E98 C7740000 C6F41DC8 C77586E0 C7740160
> C6F41DC8
> Call backtrace:
> 00000000 C0100394 C0100654 C010A770 C010A998 C0140A58 C01014A8
> C004E44C C0005A1C 10208608 100F7978 100F7454 100D09A8 100D074C
> 10058318 10028D58 0FB870E8 00000000
>
> [1]+  Segmentation fault      ./snmpd -f -Le -d -c
> /usr/share/snmp/snmpd.conf
> [email protected]:/usr/local/net-snmp/sbin# ps -ef
> UID        PID  PPID  C STIME TTY          TIME CMD
> root         1     0  0 00:00 ?        00:00:02 init [3]
> root         2     1  0 00:00 ?        00:00:00 [keventd]
> root         3     1  0 00:00 ?        00:00:00 [ksoftirqd_CPU0]
> root         4     1  0 00:00 ?        00:00:00 [kswapd]
> root         5     1  0 00:00 ?        00:00:00 [bdflush]
> root         6     1  0 00:00 ?        00:00:00 [kupdated]
> root        12     1  0 00:00 ?        00:00:00 [mtdblockd]
> root        16     1  0 00:00 ?        00:00:01 [rpciod]
> bin         75     1  0 00:00 ?        00:00:00 /sbin/portmap
> root       101     1  0 00:00 ?        00:00:00 /sbin/klogd
> root       104     1  0 00:00 ?        00:00:00 /sbin/syslogd
> root       107     1  0 00:00 ?        00:00:00 /sbin/devfsd /dev
> root       112     1  0 00:00 ?        00:00:00 /usr/sbin/inetd
> root       114     1  0 00:00 ttyS0    00:00:00 -bash
> root       123   114  0 00:09 ttyS0    00:00:00 ps -ef
> Then I tried to start my agent another time, it starts successfully while
> reporting some errors:
> [email protected]:/usr/local/net-snmp/sbin# ./snmpd -f -Le -d -c
> /usr/share/snmp/
> /snmpd.conf &
> [1] 124
> [email protected]:/usr/local/net-snmp/sbin# netsnmp_assert !"registration !=
> duplicate" failed agent_registry.c:535 netsnmp_subtree_load()
> netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
> netsnmp_subtree_load()
> netsnmp_assert !"registration != duplicate" failed agent_registry.c:535
> netsnmp_subtree_load()
>
> [email protected]:/usr/local/net-snmp/sbin# ps -ef
> UID        PID  PPID  C STIME TTY          TIME CMD
> root         1     0  0 00:00 ?        00:00:02 init [3]
> root         2     1  0 00:00 ?        00:00:00 [keventd]
> root         3     1  0 00:00 ?        00:00:00 [ksoftirqd_CPU0]
> root         4     1  0 00:00 ?        00:00:00 [kswapd]
> root         5     1  0 00:00 ?        00:00:00 [bdflush]
> root         6     1  0 00:00 ?        00:00:00 [kupdated]
> root        12     1  0 00:00 ?        00:00:00 [mtdblockd]
> root        16     1  0 00:00 ?        00:00:01 [rpciod]
> bin         75     1  0 00:00 ?        00:00:00 /sbin/portmap
> root       101     1  0 00:00 ?        00:00:00 /sbin/klogd
> root       104     1  0 00:00 ?        00:00:00 /sbin/syslogd
> root       107     1  0 00:00 ?        00:00:00 /sbin/devfsd /dev
> root       112     1  0 00:00 ?        00:00:00 /usr/sbin/inetd
> root       114     1  0 00:00 ttyS0    00:00:00 -bash
> root       124   114  0 00:09 ttyS0    00:00:00 ./snmpd -f -Le -d -c
> /usr/share/
> root       125   114  0 00:09 ttyS0    00:00:00 ps -ef
> But when I try to operate on MIBII object using snmpwalk command, it reports
> error as following:
> [email protected]:/usr/local/net-snmp/sbin# snmpwalk -v 2c -c private
> localhost interfaces
> Timeout: No Response from localhost
> Also I can see any output at agent side.

What does the config file /usr/share/snmp/snmpd.conf look like?
In particular, what are the access control settings?

Can you see anything in the system group?


> It seems that my agent don't work properly. My config options are as
> follows:
> ./configure --build=i386-linux --host=powerpc-linux --with-gnu-ld
> --prefix=/mnt/nfs/usr/local/net-snmp --with-default-snmp-version="2"
> --with-logfile="/mnt/nfs/var/log/snmpd.log"
> --with-persistent-directory="/mnt/nfs/var/net-snmp" CC=ppc_82xx-gcc
> LDFLAGS="-L/opt/montavista/pro/devkit/ppc/82xx/target/lib
> -L/opt/montavista/pro/devkit/ppc/82xx/target/usr/lib -static"
> --with-sys-contact="[email protected]" --with-sys-location="china"
> --with-endianness=big --disable-manuals --disable-scripts --disable-md5
> My CPU is MPC8247 and my OS is montavista linux 3.1. Is there any problems
> with my configure options ?
>      Hope for your answer and thanks again.



Dave

------------------------------------------------------------------------------
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to