[SNMP4J] SNMPV3 and USM Multi-Thread Issue

William Baker wlbaker1204 at hotmail.com
Thu Jan 24 12:01:44 CET 2013


I did run into an issue using the SNMPV3 USM. Most likely, the issue is my usage.  
 
I have my own multi-threaded pool application that invokes SNMP4J. Code was working well with SNMPV2 until adding SNMPV3 support.
 
USM usm = new USM(SecurityProtocols.getInstance(),new OctetString(MPv3.createLocalEngineID()), 0);
//SecurityModels.getInstance() is synchronized
        SecurityModels.getInstance().addSecurityModel(usm);
 
Each client does its own thing and above code was embedded into each thread get Target routine. The code would run okay at times, but sometimes would see a target Get, or “TableUtil” hangs, timeout, or produce message:
"Message processing model 3 returned error: Unknown security name".
 
Please note, that code would always run, if I set my application Thread Pool size to “one”.
 
The issue caused some heartburn, but found an easy solution by removing the USM out of the thread get Target routine and adding it to main (only invoke once).
 
I just want to share my SNMP V3 USM issue, just in case someone else runs into similar issues.
 
 
 
Bill 		 	   		  


More information about the SNMP4J mailing list