[SNMP4J] Problem with SNMPv3 Trap Receiver

Frank Fock fock at agentpp.com
Wed May 27 21:23:55 CEST 2009


Hello Marcin,

Can you send me the NPE stacktrace?

Best regards,
Frank

Marcin Kokoszka wrote:
> Hello Frank,
> 
> I have created some simply trap receiver (using the SNMP4J command line tool
> as an example).
> I'm adding the users manually to the USM Table:
> 
> ....
> 
> OctetString localEngineID = new OctetString(MPv3.createLocalEngineID());
>             USM usm = new USM(SecurityProtocols.getInstance(),
> localEngineID, 0);
>             usm.setEngineDiscoveryEnabled(true);
>             SecurityModels.getInstance().addSecurityModel(usm);
> ....
> 
> snmp.getUSM().addUser(securityName, new UsmUser(securityName, authProtocol,
> authPassphrase, privProtocol, privPassphrase,
> OctetString.fromHexString("ED:0C:00:00:03:00:60:A7:01:56:E5", ':')));
> 
> ....
> 
> The engin ID is also entered manually. The strange thing is that when I'm
> sending the SNMPv3 Trap to my trap receiver with command (the same engine
> id):
> 
> java -jar SNMP4J.jar -p TRAP -v 3 -u user -a MD5 -A password -x DES -P
> password -l 0xED:0C:00:00:03:00:60:A7:01:56:E5......
> 
> I'm receiving always the "SEVERE: java.lang.NullPointerException".
> When I will add the same user but without the EnginId:
> 
> ....
> snmp.getUSM().addUser(securityName, new UsmUser(securityName, authProtocol,
> authPassphrase, privProtocol, privPassphrase ));
> ...
> 
> and use the same command to send the SNMPv3 trap everything seems to be ok.
> The EngineId is discovered automatically.
> 
> Do You have any clues where is the problem?
> 
> Best regards
> Marcin
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list