On Wed, Mar 24, 2010 at 04:03:14PM +0200, Thomas Andrews wrote:

> Problem: when I do this:
> 
>   snmpget -v1 -c public localhost nstAgentSubagentObject.0
> 
> I get:
> 
>   Error in packet
>   Reason: (noSuchName) There is no such variable name in this MIB.
>   Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0
> 
> For debugging, I am starting snmpd so:
> 
>   snmpd -Le -f -Dagentx
> 
> When I run up the subagent 'mysubagent', the output from snmpd looks so:
> 
> 8<----------8<----------8<----------8<----------8<----------8<----------
> agentx/master: unexpected callback op 4
> agentx/master: handle pdu (req=0x1a8d7bd2,trans=0x0,sess=0x0)
> agentx/master: open 0x814ced8
> agentx/master: opened 0x815da00 = 5 with flags = a0
> agentx/master: send response, stat 0 (req=0x1a8d7bd2,trans=0x0,sess=0x0)
> agentx_build: packet built okay
> agentx/master: handle pdu (req=0x1a8d7bd3,trans=0x0,sess=0x5)
> agentx/master: in register_agentx_list
> agentx/master: registered ok
> agentx/master: send response, stat 0 (req=0x1a8d7bd3,trans=0x0,sess=0x5)
> agentx_build: packet built okay
> 8<----------8<----------8<----------8<----------8<----------8<----------

Here's some more info. When the agentx subagent registers, I get this:

8<----------8<----------8<----------8<----------8<----------8<----------
agentx/master: unexpected callback op 4

Received 80 bytes from Local IPC: /var/agentx/master
0000: 01 01 00 00  00 00 00 00  00 00 00 00  56 E4 DE 21    ............V??!
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00    <...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00    ................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX sub-agent...

agentx/master: handle pdu (req=0x21dee456,trans=0x0,sess=0x0)
agentx/master: open 0x814cec8
agentx/master: opened 0x814d660 = 13 with flags = a0
agentx/master: send response, stat 0 (req=0x21dee456,trans=0x0,sess=0x0)
agentx_build: packet built okay

Sending 88 bytes to Local IPC: /var/agentx/master
0000: 01 12 00 00  0D 00 00 00  00 00 00 00  56 E4 DE 21    ............V??!
0016: 44 00 00 00  5F 6C 02 00  00 00 00 00  04 00 00 00    D..._l..........
0032: 05 04 00 00  01 00 00 00  88 1F 00 00  03 00 00 00    ................
0048: 02 00 00 00  0A 00 00 00  19 00 00 00  4E 65 74 2D    ............Net-
0064: 53 4E 4D 50  20 41 67 65  6E 74 58 20  73 75 62 2D    SNMP AgentX sub-
0080: 61 67 65 6E  74 00 00 00                              agent...


Received 60 bytes from Local IPC: /var/agentx/master
0000: 01 03 01 00  0D 00 00 00  00 00 00 00  57 E4 DE 21    ............W??!
0016: 28 00 00 00  00 7F 00 00  08 04 00 00  01 00 00 00    (...............
0032: 88 1F 00 00  02 00 00 00  04 00 00 00  01 00 00 00    ................
0048: 01 00 00 00  02 00 00 00  00 00 00 00                 ............

agentx/master: handle pdu (req=0x21dee457,trans=0x0,sess=0xd)
agentx/master: in register_agentx_list
agentx/master: registered ok
agentx/master: send response, stat 0 (req=0x21dee457,trans=0x0,sess=0xd)
agentx_build: packet built okay

Sending 68 bytes to Local IPC: /var/agentx/master
0000: 01 12 01 00  0D 00 00 00  00 00 00 00  57 E4 DE 21    ............W??!
0016: 30 00 00 00  60 6C 02 00  00 00 00 00  05 00 00 00    0...`l..........
0032: 08 04 00 00  01 00 00 00  88 1F 00 00  02 00 00 00    ................
0048: 04 00 00 00  01 00 00 00  01 00 00 00  02 00 00 00    ................
0064: 00 00 00 00                                           ....
8<----------8<----------8<----------8<----------8<----------8<----------

When I do 'snmpget -v1 -c public localhost nstAgentSubagentObject.0' I get this:

8<----------8<----------8<----------8<----------8<----------8<----------
Received 46 bytes from UDP: [10.1.1.2]:57461
0000: 30 2C 02 01  00 04 06 70  75 62 6C 69  63 A0 1F 02    0,.....public?..
0016: 02 34 89 02  01 00 02 01  00 30 13 30  11 06 0D 2B    .4.......0.0...+
0032: 06 01 04 01  BF 08 02 04  01 01 02 00  05 00          ....?.........

Connection from UDP: [10.1.1.2]:57461
Received SNMP packet(s) from UDP: [10.1.1.2]:57461
  GET message
    -- NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0

Sending 46 bytes to UDP: [10.1.1.2]:57461
0000: 30 2C 02 01  00 04 06 70  75 62 6C 69  63 A2 1F 02    0,.....public?..
0016: 02 34 89 02  01 02 02 01  01 30 13 30  11 06 0D 2B    .4.......0.0...+
0032: 06 01 04 01  BF 08 02 04  01 01 02 00  05 00          ....?.........
8<----------8<----------8<----------8<----------8<----------8<----------

So I'm concluding that because there are no 'IPC' messages for the snmpget
command, somehow either snmpd is mis-configured, or that 'unexpected callback 
op 4'
is part of the problem. I see that error in subagent.c but I have no idea
what the problem is.

Any help would be *really* appreciated!
Thanks,
Thomas

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to