Title: subagent problem

Hi,

I compiled the subagent example found in the site, executed it and ran snmpget.
The subagent printed the following output and than exited.

subagent output:
output: sprint_by_type, type 195
trace: sprint_realloc_by_type(): mib.c, 1962
sprint_by_type: bad type: 195
NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0 = Wrong Type (should be INTEGER): Variable has bad type
trace: netsnmp_callback_send(): snmpCallbackDomain.c, 297
transport_callback: hook_send exit
trace: _sess_read(): snmp_api.c, 5108
sess_read: not reading 3 (fdset 0xbffff0e0 set 0)
trace: snmp_sess_select_info(): snmp_api.c, 5513
sess_select: for all sessions: 6 5 3
trace: _sess_read(): snmp_api.c, 5108
sess_read: not reading 6 (fdset 0xbffff0e0 set 0)
trace: _sess_read(): snmp_api.c, 5108
sess_read: not reading 5 (fdset 0xbffff0e0 set 0)
trace: netsnmp_callback_recv(): snmpCallbackDomain.c, 179
transport_callback: hook_recv enter
trace: netsnmp_callback_recv(): snmpCallbackDomain.c, 201
transport_callback: hook_recv exit
trace: _sess_process_packet(): snmp_api.c, 4790
sess_process_packet: session 0x804b080 fd 3 pkt 0x807f938 length 1
./example-demon: relocation error: /usr/lib/libnetsnmpagent.so.5: undefined symbol: hosts_ctl

snmpd output:
agentx/subagent: init_subagent sess 08099188
Turning on AgentX master support.
agentx/master: initializing...
agentx/master: initializing...   DONE
NET-SNMP version 5.1
agentx/master: handle pdu (req=0x7d39f28f,trans=0x0,sess=0x0)
agentx/master: open 0x80cb6b8
agentx/master: opened 0x80dc210 = 6 with flags = a0
agentx/master: send response, stat 0 (req=0x7d39f28f,trans=0x0,sess=0x0)
agentx_build: packet built okay
agentx/master: handle pdu (req=0x7d39f290,trans=0x0,sess=0x6)
agentx/master: in register_agentx_list
agentx/master: registered ok
agentx/master: send response, stat 0 (req=0x7d39f290,trans=0x0,sess=0x6)
agentx_build: packet built okay
agentx/master: agentx master handler starting, mode = 0xa0
agentx/master: request for variable ()
agentx: sending pdu (req=0x2,trans=0x1,sess=0x6)
agentx_build: packet built okay
agentx/master: transport disconnect on session 0x80cb6b8
agentx/master: close 0x80cb6b8, -1

smpget command output:
Error in packet
Reason: (genError) A general failure occured
Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0

Can you please advise?
Thanks,
Liat.

Reply via email to