Has anyone had any success using UDP as the transport between an SNMP4J AgentX 
subagent and net-snmp snmpd?  The sub-agent establishes a session and registers 
its managed objects successfully (under a specific context name), but the 
master agent does not forward any SNMP requests to the sub-agent.  I am using 
net-snmp 5.3.2.2 and snmp4j-agentx-1.2.2.  There are no issues when using TCP 
as the transport, nor are there any issues when the sub-agent connects over UDP 
to an SNMP4J master agent.

I have read that AgentX was not designed to be used over a connection-less 
transport.  Any opinions on that?

I did find a bug in AgentXSubagent where it does not close the session because 
the session ID is not set in the close PDU.  The presence of this bug suggests 
to me that UDP is not commonly used.  With TCP the termination of the 
connection causes the session resources to be released so it would not 
typically be a problem.  I just happened to notice in the snmpd trace that it 
was complaining about an unknown session in the close PDU.

--- snmp4j-agentx-1.3/src/org/snmp4j/agent/agentx/subagent/AgentXSubagent.java  
2010-04-21 18:01:11.000000000 -0500
***************
*** 155,161 ****
      }
      session.setClosed(true);
      AgentXClosePDU closePDU =
!         new AgentXClosePDU(AgentXProtocol.REASON_SHUTDOWN);
      AgentXTarget target = session.createAgentXTarget();
      AgentXResponseEvent resp =
          agentX.send(closePDU, target, session.getPeer().getTransport());
--- 155,162 ----
      }
      session.setClosed(true);
      AgentXClosePDU closePDU =
!         new AgentXClosePDU(reason);
!     closePDU.setSessionAttributes(session);
      AgentXTarget target = session.createAgentXTarget();
      AgentXResponseEvent resp =
          agentX.send(closePDU, target, session.getPeer().getTransport());


_______________________________________________
SNMP4J mailing list
SNMP4J@agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j

Reply via email to