[SNMP4J] Multiple SNMPv3 Agents running within same Java process

Stuart Bonsey Stuart.Bonsey at Aviatnet.com
Wed Dec 12 22:30:42 CET 2018


Hi,

I am writing a Java application that creates multiple instances of SNMPv3 Agents using SNMP4j-Agent 2.3.1 – a lot like a simulator.

It is working correctly when I instantiate a single agent, however whenever I start multiple agents, only the last agent responds correctly…all other agents respond with “Unknown user name”

If I create multiple agents running in separate Java processes, then both agents work as expected.

Is this a known issue / limitation of SNMP4J-Agent? Or am I doing something wrong?

I have reproduced the issue using the TestAgent code provide here https://github.com/joescii/snmp4s/blob/master/core/src/test/java/org/snmp4s/TestAgent.java and starting two agents, only the last one responds correctly to v3 requests.

public static void main(String[] args) {
    TestAgent.start("192.168.178.100/1610");
     TestAgent.start("192.168.178.103/1610");
}

Any help here would be greatly appreciated.

Thanks
Stu



More information about the SNMP4J mailing list