agentx: snmpd does not route put to subagent

Juan Carlos Franzoy <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello. First of all, thank for reading my post.

I am facing problem with an agentx subagent that must support gets and puts.
But when I issue an snmpset command, nothing arrives to subagent.

I run master agent in this way:
      ./snmpd -c ../share/snmp/snmpd.conf -C -f -L -V -d -Dagentx

I see
    subagent ==> OPEN PDU ==> snmpd
    subagent < == RESPONSE (no error) <== snmpd
    subagent ==> REGISTER (prefix=4 subtree=1.4908.3.20.5) ==> snmpd
    subagent < == RESPONSE (no error) <== snmpd

I run: snmpset -v 1 -c public localhost 1.3.6.1.4.1.4908.3.20.5 i 1
Nothing hapends between snmpd and subagent.

Anybody knows what may be happening?  Thank in advance.


DETAILS
------------

# grep -v '^#' /usr/local/net-snmp-5.5/share/snmp/snmpd.conf | grep -v '^[
]*$'
rocommunity  public
rwcommunity  private localhost .1.3.6.1.4.1.42.2.15
syslocation  Corrientes
syscontact  HelpDesc
sysservices 72
master agentx
AgentXSocket unix:/tmp/agentx_ats
agentxPerms  777
trapsink localhost

# uname -a
SunOS bcpp-solaris10 5.10 Generic_139556-08 i86pc i386 i86pc

# isalist
amd64 pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86

# /usr/local/net-snmp-5.5/bin/net-snmp-config --configure-options
 '--prefix=/usr/local/net-snmp-5.5'

# gcc --version
gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# gcc -v
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --wit
h-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)



Ouput of snmpd *commented*
----------------------
My comments are marked with @#@

# /usr/local/net-snmp-5.5/sbin/snmpd -c
/usr/local/net-snmp-5.5/share/snmp/snmpd.conf -C -f -L -V -d -Dagentx
registered debug token agentx, 1
agentx_register_app_config_handler: registering .conf token for
"agentxsocket"
agentx_register_app_config_handler: registering .conf token for
"agentxperms"
agentx_register_app_config_handler: registering .conf token for
"agentxRetries"
agentx_register_app_config_handler: registering .conf token for
"agentxTimeout"
Turning on AgentX master support.
agentx/config: port spec: unix:/tmp/agentx_ats
agentx/config: port permissions: 777
agentx/config: socket permissions: 777 (511)
agentx/master: initializing...
agentx/master: initializing...   DONE

Sending 44 bytes to UDP: [127.0.0.1]:162->[0.0.0.0]
0000: 30 2A 02 01  00 04 06 70  75 62 6C 69  63 A4 1D 06    0*.....public...
0016: 0A 2B 06 01  04 01 BF 08  03 02 03 40  04 AC 10 61    [email protected]
0032: E0 02 01 00  02 01 00 43  01 06 30 00                 .......C..0.

NET-SNMP version 5.5
agentx/master: unexpected callback op 4

@#@ snmpd communicates with subagents via unix domain socket
(/tmp/agentx_ats)

Received 80 bytes from Local IPC: /tmp/agentx_ats
0000: 01 01 00 00  00 00 00 00  00 00 00 00  56 16 F3 72    ............V..r
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  03 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...

@#@ open pdu: h.version=1, h.type=1 (open), h.flags=0, h.sessionID=0,
h.transactionID=0, h.packetID =0x72f31656, h.payload_length=60
@#@ open pdu: oid=(n_subid=5, prefix=4, subidentifiers=(1,8072,3,2,3))
@#@ open pdu: descr=( length=25, data=Net-SNMP AgentX sub-agent )


agentx/master: handle pdu (req=0x72f31656,trans=0x0,sess=0x0)
agentx/master: open  8175f28
agentx/master: opened  8176a60 = 6 with flags = a0
agentx/master: send response, stat 0 (req=0x72f31656,trans=0x0,sess=0x0)
agentx_build: packet built okay

Sending 88 bytes to Local IPC: /tmp/agentx_ats
0000: 01 12 00 00  06 00 00 00  00 00 00 00  56 16 F3 72    ............V..r
0016: 44 00 00 00  43 01 00 00  00 00 00 00  04 00 00 00    D...C...........
0032: 05 04 00 00  01 00 00 00  88 1F 00 00  03 00 00 00    ................
0048: 02 00 00 00  03 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...

@#@ response pdu: h.version=1, h.type=18 (response), h.flags=0,
h.sessionID=6, h.transactionID=0, h.packetID =0x72f31656,
h.payload_length=68
@#@ response pdu: res.sysUpTime=0x0143, res.error=0, res.index=0


Received 48 bytes from Local IPC: /tmp/agentx_ats
0000: 01 03 00 00  06 00 00 00  00 00 00 00  57 16 F3 72    ............W..r
0016: 1C 00 00 00  00 7F 00 00  05 04 00 00  01 00 00 00    ................
0032: 2C 13 00 00  03 00 00 00  14 00 00 00  05 00 00 00    ,...............

@#@ register pdu: h.version=1, h.type=3 (register) h.flags=0, h.sessionID=6,
h.transactionID=0, h.packetID =0x72f31657, h.payload_length=28
@#@ register pdu: r.timeout=0, r.priorify=127, r.range_subid=0
@#@ register pdu: r.subtree = ( n_subid = 5, prefix = 4, subidentifiers = (
1, 4908, 3, 20, 5 ) )


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

Sending 56 bytes to Local IPC: /tmp/agentx_ats
0000: 01 12 00 00  06 00 00 00  00 00 00 00  57 16 F3 72    ............W..r
0016: 24 00 00 00  43 01 00 00  00 00 00 00  05 00 00 00    $...C...........
0032: 05 04 00 00  01 00 00 00  2C 13 00 00  03 00 00 00    ........,.......
0048: 14 00 00 00  05 00 00 00                              ........

@#@ response pdu: h.version=1, h.type=18 (response) h.flags=0,
h.sessionID=6, h.transactionID=0, h.packetID =0x72f31657,
h.payload_length=36
@#@ response pdu: res.sysUpTime=0x0143, res.error=0, res.index=0


Received 46 bytes from UDP: [127.0.0.1]:57103->[0.0.0.0]
0000: 30 2C 02 01  00 04 06 70  75 62 6C 69  63 A3 1F 02    0,.....public...
0016: 04 28 9E 6C  AC 02 01 00  02 01 00 30  11 30 0F 06    .(.l.......0.0..
0032: 0A 2B 06 01  04 01 A6 2C  03 14 05 02  01 01          .+.....,......

Received SNMP packet(s) from UDP: [127.0.0.1]:57103->[0.0.0.0]
  SET message
    -- SNMPv2-SMI::enterprises.4908.3.20.5

@#@ It's clear that snmpd is not routing the request to the subagent.

Sending 46 bytes to UDP: [127.0.0.1]:57103->[0.0.0.0]
0000: 30 2C 02 01  00 04 06 70  75 62 6C 69  63 A2 1F 02    0,.....public...
0016: 04 28 9E 6C  AC 02 01 02  02 01 01 30  11 30 0F 06    .(.l.......0.0..
0032: 0A 2B 06 01  04 01 A6 2C  03 14 05 02  01 01          .+.....,......

Received TERM or STOP signal...  shutting down...

Sending 43 bytes to UDP: [127.0.0.1]:162->[0.0.0.0]
0000: 30 29 02 01  00 04 06 70  75 62 6C 69  63 A4 1C 06    0).....public...
0016: 08 2B 06 01  04 01 BF 08  04 40 04 AC  10 61 E0 02    [email protected]..
0032: 01 06 02 01  02 43 02 04  1C 30 00                    .....C...0.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.