My apologies, I didn't include any debugging from /usr/sfw/sbin/snmpd,
/var/log/snmpd.log.
Its attached, added #####TJM to note areas of concern, lines 283 and 403.
I had to resend the request so sequence numbers are not the same between
traces, but it does illustrate the problem, snmpd gets a response from tree
353, responds 326.
Tom
-----Original Message-----
From: Moore, Thomas
Sent: Thursday, November 30, 2006 12:15 PM
To: '[EMAIL PROTECTED]'; Moore, Thomas
Cc: [EMAIL PROTECTED]; [email protected]; [EMAIL PROTECTED]
Subject: RE: [Fwd: [osol-discuss] snmp subagent migration]
Hi Ganesh,
The snmp configuration is basically the default. Initially, snmpdx.reg was
not modified until a problem was noticed, next step was adding our agent
definitions per the migration note found at Sun.
I didn't attach the agent because to see the issue you need an ATM nic
adapter.
I have attached my solaris specific code with the SSA calls to open the
agent and register subtrees. You may notice some odd looking code to cater
to a case where we have 2 subagents running with some printf("TJM...")
messages. I just wanted to isolate some things. I hope this doesn't muddle
the discussion.
I have attached snmpd.conf and snmpdx.reg.
The subagent was developed quite some time ago.
I have also attached the debug output from /usr/lib/snmp/snmpd for a getnext
request to show the problem. In test.txt I have annoted some stuff with
lines that being ####. At the end I have a trace of the packets
send/received by the snmp requestor.
At the end of the my agent responds in tree 353, but the requestor receives
a packet in the 326 tree.
Thank you for your time!
Tom
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 30, 2006 1:02 AM
To: Tom Moore
Cc: [EMAIL PROTECTED]; [email protected]; [EMAIL PROTECTED]
Subject: Re: [Fwd: [osol-discuss] snmp subagent migration]
Hi Tom,
From solaris 10 onwards SMA(System Management Agent) is the default snmp
agent.
SEA will work as subagent to SMA. If you want to configure SEA alone or
along with SMA, both are possible.
As per your configuration SEA agent should work. Can you please send us your
configuration files and the agent which you are configuring. Are you using
SEA SDK for developing your agent. Please let me know.
You can also post a query to [EMAIL PROTECTED] or [EMAIL PROTECTED] for
help.
Regards
Ganesh.
>
> Subject: [osol-discuss] snmp subagent migration
> Date: Wed, 29 Nov 2006 08:16:00 -0800 (PST)
> From: Tom Moore <[EMAIL PROTECTED]>
> To: [email protected]
>
>
>
> I'm moving a subagent that has operated thru a number of versions of
> Solaris to version 10. At this time converting from SEA to SMA is not
> being considered.
>
> When my agent starts the message "unsupported mode for proxy called"
> is written to snmpd.log a number of times.
> The recommendation at
> http://docs.sun.com/app/docs/doc/817-3000/6mikgngho?a=view#migrationad
> min-15 is being followed. The dlmod entries have been made to
> smpd.conf.
>
> The snmpdx.reg file has been updated as follows:
> agents =
> {
> {
> name = "relay-agent"
> subtrees = { sun.2.15 }
> timeout = 900000000
> port = 16161
> }
> {
> name = "myAgent"
> subtrees = { tree1, tree2}
> timeout = tmo_value
> port = port_value
> }
> }
>
>
> An example problem is requestor issues get for tree1.x.x.x where x.x.x
> is invalid. Subagent returns nosuch name, however the requestor
> receive a response of tree1.x.x.x NULL, no error.
>
> Perhaps I have missed something the proxy setup or maybe someone might
> have a suggestion on what is occurring.
>
> Thanks
> Tom
>
>
> This message posted from opensolaris.org
> _______________________________________________
> opensolaris-discuss mailing list
> [email protected]
>
[EMAIL PROTECTED]:/ > tail -f /var/log/snmpd.log
trace: ucd-snmp/vmstat_solaris2.c, 451
ucd-snmp/vmstat_solaris2.c:update_stats: updating stats
trace: ucd-snmp/vmstat_solaris2.c, 532
ucd-snmp/vmstat_solaris2.c:update_stats: time_diff: 295001
trace: snmp_alarm.c, 249
snmp_alarm: alarm 4 completed
trace: snmp_api.c, 5572
sess_select: for all sessions: 24 23 21 20 19 14 18 17 16 15 10 8 4
trace: snmpd.c, 1097
snmpd/select: select( numfds=25, ..., tvp=ffffffff7fff94b8)
trace: snmpd.c, 1099
snmpd/select: returned, count = 0
trace: snmp_alarm.c, 247
snmp_alarm: run alarm 2
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[0] time 0 ttl 0
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[1] time 0 ttl 30
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[2] time 0 ttl 0
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[3] time 0 ttl 60
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[4] time 0 ttl 60
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[5] time 0 ttl 30
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[6] time 0 ttl 300
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[7] time 0 ttl 60
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[8] time 0 ttl 60
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[9] time 0 ttl 30
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[10] time 0 ttl 30
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[11] time 0 ttl 30
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[12] time 0 ttl 0
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[13] time 0 ttl 0
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[14] time 0 ttl 0
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[15] time 0 ttl 0
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[16] time 0 ttl 0
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[17] time 0 ttl 0
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[18] time 0 ttl 0
trace: kernel_sunos5.c, 213
kernel_sunos5: cache[19] time 0 ttl 0
trace: snmp_alarm.c, 249
snmp_alarm: alarm 2 completed
trace: snmp_api.c, 5572
sess_select: for all sessions: 24 23 21 20 19 14 18 17 16 15 10 8 4
trace: snmpd.c, 1097
snmpd/select: select( numfds=25, ..., tvp=ffffffff7fff94b8)
trace: snmpd.c, 1099
snmpd/select: returned, count = 1
trace: snmp_api.c, 5160
sess_read: not reading 24 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 23 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 21 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 20 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 19 (fdset ffffffff7fffd4c8 set 0)
trace: snmpUDPDomain.c, 128
netsnmp_udp: recvfrom fd 14 got 47 bytes (from 10.90.2.134)
trace: snmp_api.c, 4842
sess_process_packet: session 1002855d0 fd 14 pkt 1002c46a0 length 47
Received 47 bytes from 10.90.2.134
0000: 30 2D 02 01 00 04 06 70 75 62 6C 69 63 A1 20 02 0-.....public¡ .
0016: 03 00 CE 42 02 01 00 02 01 00 30 13 30 11 06 0D ..ÎB......0.0...
0032: 2B 06 01 04 01 82 46 86 78 06 02 01 00 05 00 +.....F.x......
Received SNMP packet(s) from 10.90.2.134
trace: snmp_agent.c, 539
netsnmp_agent_check_packet: cache overrundumpx_recv:
02 01 00
dumpv_recv:
Integer: 0 (0x00)
trace: snmp_api.c, 3901
snmp_api: Parsing SNMPv1 message...
trace: snmp_api.c, 3907
dumph_recv:
SNMPv1 message
trace: snmp_auth.c, 131
dumph_recv:
SNMP version
dumpx_recv:
02 01 00
dumpv_recv:
Integer: 0 (0x00)
trace: snmp_auth.c, 143
dumph_recv:
community string
dumpx_recv:
04 06 70 75 62 6C 69 63
dumpv_recv:
String: public
trace: snmp_api.c, 3950
dumph_recv:
PDU
trace: snmp_api.c, 4156
dumph_recv:
request_id
dumpx_recv:
02 03 00 CE 42
dumpv_recv:
Integer: 52802 (0xCE42)
trace: snmp_api.c, 4167
dumph_recv:
error status
dumpx_recv:
02 01 00
dumpv_recv:
Integer: 0 (0x00)
trace: snmp_api.c, 4178
dumph_recv:
error index
dumpx_recv:
02 01 00
dumpv_recv:
Integer: 0 (0x00)
trace: snmp_api.c, 4190
dumph_recv:
VarBindList
trace: snmp_api.c, 4220
dumph_recv:
VarBind
trace: snmp.c, 151
dumph_recv:
Name
dumpx_recv:
06 0D 2B 06 01 04 01 82 46 86 78 06 02 01 00
dumpv_recv:
ObjID: SNMPv2-SMI::enterprises.326.888.6.2.1.0
trace: snmp_api.c, 4229
dumph_recv:
Value
GETNEXT message
-- SNMPv2-SMI::enterprises.326.888.6.2.1.0
trace: snmp_agent.c, 931
snmp_agent: agent_sesion 1002bf990 created
trace: callback.c, 164
callback: START calling callbacks for maj=1 min=5
trace: callback.c, 172
callback: calling a callback for maj=1 min=5
trace: mibII/vacm_vars.c, 735
mibII/vacm_vars: vacm_in_view: ver=0, community=public
trace: snmpUDPDomain.c, 723
netsnmp_udp_getSecName: resolve <"public", 0x0a5a0286>
trace: snmpUDPDomain.c, 728
netsnmp_udp_getSecName: compare <"public", 0x00000000/0x00000000>... SUCCESS
trace: agent_registry.c, 156
subtree: looking for subtree for context: ""
trace: agent_registry.c, 160
subtree: found one for: ""
trace: mibII/vacm_vars.c, 841
mibII/vacm_vars: vacm_in_view: sn=anonymousSecName000,
gn=anonymousGroupName000, Done checking setup
trace: callback.c, 184
callback: END calling callbacks for maj=1 min=5 (1 called)
trace: agent_registry.c, 156
subtree: looking for subtree for context: ""
trace: agent_registry.c, 160
subtree: found one for: ""
trace: snmp_agent.c, 1510
snmp_agent: add_vb_to_cache(1002bf990, 1,
SNMPv2-SMI::enterprises.326.888.6.2.1.0, 1002429b0)
trace: callback.c, 164
callback: START calling callbacks for maj=1 min=12
trace: callback.c, 172
callback: calling a callback for maj=1 min=12
trace: mibII/vacm_vars.c, 735
mibII/vacm_vars: vacm_in_view: ver=0, community=public
trace: snmpUDPDomain.c, 723
netsnmp_udp_getSecName: resolve <"public", 0x0a5a0286>
trace: snmpUDPDomain.c, 728
netsnmp_udp_getSecName: compare <"public", 0x00000000/0x00000000>... SUCCESS
trace: agent_registry.c, 156
subtree: looking for subtree for context: ""
trace: agent_registry.c, 160
subtree: found one for: ""
trace: mibII/vacm_vars.c, 841
mibII/vacm_vars: vacm_in_view: sn=anonymousSecName000,
gn=anonymousGroupName000, vn=anonymousView000
trace: vacm.c, 528
vacm:checkSubtree: , included
trace: callback.c, 184
callback: END calling callbacks for maj=1 min=12 (1 called)
trace: snmp_agent.c, 1575
snmp_agent: tp->start SNMPv2-SMI::enterprises.326, tp->end
SNMPv2-SMI::enterprises.327,
trace: agent_handler.c, 347
handler:calling: calling main handler bulk_to_next
trace: agent_handler.c, 391
handler:calling: calling handler proxy
trace: ucd-snmp/proxy.c, 317
proxy: proxy handler starting, mode = 161
trace: ucd-snmp/proxy.c, 259
proxy: session has no community string
trace: ucd-snmp/proxy.c, 267
proxy: pdu has community string
trace: ucd-snmp/proxy.c, 385
proxy: sending pdu
trace: snmp_api.c, 2752
snmp_send: Building SNMPv1 message...
trace: snmp_api.c, 2755
dumph_send:
PDU-GETNEXT
trace: snmp_api.c, 3106
snmp_pdu_realloc_rbuild: starting
trace: snmp_api.c, 3121
dumph_send:
VarBind
trace: snmp.c, 322
dumph_send:
Value
dumpx_send:
05 00
dumpv_send:
NULL
trace: snmp.c, 419
dumph_send:
Name
dumpx_send:
06 0D 2B 06 01 04 01 82 46 86 78 06 02 01 00
dumpv_send:
ObjID: SNMPv2-SMI::enterprises.326.888.6.2.1.0
trace: snmp_api.c, 3189
dumph_send:
error index
dumpx_send:
02 01 00
dumpv_send:
Integer: 0 (0x00)
trace: snmp_api.c, 3202
dumph_send:
error status
dumpx_send:
02 01 00
dumpv_send:
Integer: 0 (0x00)
trace: snmp_api.c, 3215
dumph_send:
request_id
dumpx_send:
02 04 35 8F 22 53
dumpv_send:
Integer: 898572883 (0x358F2253)
trace: snmp_api.c, 2761
dumph_send:
Community String
dumpx_send:
04 06 70 75 62 6C 69 63
dumpv_send:
String: public
trace: snmp_api.c, 2777
dumph_send:
SNMP Version Number
dumpx_send:
02 01 00
dumpv_send:
Integer: 0 (0x00)
trace: snmp_api.c, 2795
dumph_send:
SNMPv1 Message
Sending 48 bytes to 127.0.0.1
0000: 30 2E 02 01 00 04 06 70 75 62 6C 69 63 A1 21 02 0......public¡!.
0016: 04 35 8F 22 53 02 01 00 02 01 00 30 13 30 11 06 .5."S......0.0..
0032: 0D 2B 06 01 04 01 82 46 86 78 06 02 01 00 05 00 .+.....F.x......
trace: snmpUDPDomain.c, 161
netsnmp_udp: send 48 bytes from 100238260 to 127.0.0.1 on fd 17
trace: agent_handler.c, 396
handler:returned: handler proxy returned 0
trace: snmp_agent.c, 2631
results: request results (status = 0):
trace: snmp_agent.c, 2634
results: trace: mib.c, 1957
output: sprint_by_type, type 5
SNMPv2-SMI::enterprises.326.888.6.2.1.0 = NULL
trace: snmp_agent.c, 1026
snmp_agent: delegate session == 1002bf990
trace: snmp_agent.c, 1498
snmp_agent: end of handle_snmp_packet, asp = 1002bf990
trace: snmp_api.c, 5160
sess_read: not reading 18 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 17 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 16 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 15 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 10 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 8 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 4 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5572
sess_select: for all sessions: 24 23 21 20 19 14 18 17 16 15 10 8 4
trace: snmpd.c, 1097
snmpd/select: select( numfds=25, ..., tvp=ffffffff7fff94b8)
trace: snmpd.c, 1099
snmpd/select: returned, count = 1
trace: snmp_api.c, 5160
sess_read: not reading 24 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 23 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 21 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 20 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 19 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 14 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 18 (fdset ffffffff7fffd4c8 set 0)
trace: snmpUDPDomain.c, 128
netsnmp_udp: recvfrom fd 17 got 49 bytes (from 127.0.0.1)
trace: snmp_api.c, 4842
sess_process_packet: session 100285030 fd 17 pkt 1002c46a0 length 49
####TJM: packet received matches my agent response
Received 49 bytes from 127.0.0.1
0000: 30 2F 02 01 00 04 06 70 75 62 6C 69 63 A2 22 02 0/.....public¢".
0016: 04 35 8F 22 53 02 01 00 02 01 00 30 14 30 12 06 .5."S......0.0..
0032: 0D 2B 06 01 04 01 82 61 02 01 01 01 01 01 02 01 .+.....a........
0048: 01 .
trace: snmp_api.c, 3901
snmp_api: Parsing SNMPv1 message...
trace: snmp_api.c, 3907
dumph_recv:
SNMPv1 message
trace: snmp_auth.c, 131
dumph_recv:
SNMP version
dumpx_recv:
02 01 00
dumpv_recv:
Integer: 0 (0x00)
trace: snmp_auth.c, 143
dumph_recv:
community string
dumpx_recv:
04 06 70 75 62 6C 69 63
dumpv_recv:
String: public
trace: snmp_api.c, 3950
dumph_recv:
PDU
trace: snmp_api.c, 4156
dumph_recv:
request_id
dumpx_recv:
02 04 35 8F 22 53
dumpv_recv:
Integer: 898572883 (0x358F2253)
trace: snmp_api.c, 4167
dumph_recv:
error status
dumpx_recv:
02 01 00
dumpv_recv:
Integer: 0 (0x00)
trace: snmp_api.c, 4178
dumph_recv:
error index
dumpx_recv:
02 01 00
dumpv_recv:
Integer: 0 (0x00)
trace: snmp_api.c, 4190
dumph_recv:
VarBindList
trace: snmp_api.c, 4220
dumph_recv:
VarBind
trace: snmp.c, 151
dumph_recv:
Name
dumpx_recv:
06 0D 2B 06 01 04 01 82 61 02 01 01 01 01 01
dumpv_recv:
ObjID: SNMPv2-SMI::enterprises.353.2.1.1.1.1.1
trace: snmp_api.c, 4229
dumph_recv:
Value
dumpx_recv:
02 01 01
dumpv_recv:
Integer: 1 (0x01)
trace: ucd-snmp/proxy.c, 453
proxy: got response... SNMPv2-SMI::enterprises.353.2.1.1.1.1.1
trace: ucd-snmp/proxy.c, 476
proxy: out of registered base range...
trace: snmp_api.c, 5160
sess_read: not reading 16 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 15 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 10 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 8 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_api.c, 5160
sess_read: not reading 4 (fdset ffffffff7fffd4c8 set 0)
trace: snmp_agent.c, 2247
snmp_agent: processing delegated request, asp = 1002bf990
trace: callback.c, 164
callback: START calling callbacks for maj=1 min=0
trace: callback.c, 172
callback: calling a callback for maj=1 min=0
trace: mibII/vacm_vars.c, 735
mibII/vacm_vars: vacm_in_view: ver=0, community=public
trace: snmpUDPDomain.c, 723
netsnmp_udp_getSecName: resolve <"public", 0x0a5a0286>
trace: snmpUDPDomain.c, 728
netsnmp_udp_getSecName: compare <"public", 0x00000000/0x00000000>... SUCCESS
trace: agent_registry.c, 156
subtree: looking for subtree for context: ""
trace: agent_registry.c, 160
subtree: found one for: ""
trace: mibII/vacm_vars.c, 841
mibII/vacm_vars: vacm_in_view: sn=anonymousSecName000,
gn=anonymousGroupName000, vn=anonymousView000trace: vacm.c, 371
vacm:getView: , found
, vt=1
trace: callback.c, 184
callback: END calling callbacks for maj=1 min=0 (1 called)
trace: snmp_api.c, 2752
snmp_send: Building SNMPv1 message...
trace: snmp_api.c, 2755
dumph_send:
PDU-RESPONSE
trace: snmp_api.c, 3106
snmp_pdu_realloc_rbuild: starting
trace: snmp_api.c, 3121
dumph_send:
VarBind
trace: snmp.c, 322
dumph_send:
Value
dumpx_send:
02 01 01
dumpv_send:
Integer: 1 (0x01)
trace: snmp.c, 419
dumph_send:
Name
dumpx_send:
06 0D 2B 06 01 04 01 82 46 86 78 06 02 01 00
dumpv_send:
ObjID: SNMPv2-SMI::enterprises.326.888.6.2.1.0
trace: snmp_api.c, 3189
dumph_send:
error index
dumpx_send:
02 01 00
dumpv_send:
Integer: 0 (0x00)
trace: snmp_api.c, 3202
dumph_send:
error status
dumpx_send:
02 01 00
dumpv_send:
Integer: 0 (0x00)
trace: snmp_api.c, 3215
dumph_send:
request_id
dumpx_send:
02 03 00 CE 42
dumpv_send:
Integer: 52802 (0xCE42)
trace: snmp_api.c, 2761
dumph_send:
Community String
dumpx_send:
04 06 70 75 62 6C 69 63
dumpv_send:
String: public
trace: snmp_api.c, 2777
dumph_send:
SNMP Version Number
dumpx_send:
02 01 00
dumpv_send:
Integer: 0 (0x00)
trace: snmp_api.c, 2795
dumph_send:
SNMPv1 Message
####TJM: packet sent matches what snoop shows, wrong subtree!
Sending 48 bytes to 10.90.2.134
0000: 30 2E 02 01 00 04 06 70 75 62 6C 69 63 A2 21 02 0......public¢!.
0016: 03 00 CE 42 02 01 00 02 01 00 30 14 30 12 06 0D ..ÎB......0.0...
0032: 2B 06 01 04 01 82 46 86 78 06 02 01 00 02 01 01 +.....F.x.......
trace: snmpUDPDomain.c, 161
netsnmp_udp: send 48 bytes from 100238260 to 10.90.2.134 on fd 14
trace: snmp_agent.c, 1361
snmp_agent: REMOVE session == 1002bf990
trace: snmp_agent.c, 954
snmp_agent: agent_sesion 1002bf990 released
trace: snmp_api.c, 5572
sess_select: for all sessions: 24 23 21 20 19 14 18 17 16 15 10 8 4
trace: snmpd.c, 1097
snmpd/select: select( numfds=25, ..., tvp=ffffffff7fff94b8)
^C
[EMAIL PROTECTED]:/ >
_______________________________________________
opensolaris-discuss mailing list
[email protected]