I am receiving traps by implementing SnmpClient (which means writing the methods for authenticate, debugPrint, and callback). It works fine for v2 traps and some v3 traps. From a particular device however, when a v3 trap comes in, the 'authenticate' method does not get executed, and the PDU in the callback is null. I see the trap come in and get decoded using wireshark, and I was able to turn on debugging and see the trap data (in hex) be written to the log file in the debugPrint method in the receiver. I also (sometimes) see an error in the log: 'Error decoding Packet: Parse Auth: Incorrect VarBind'.
How do I get more information about this though? What exactly is wrong with the packet? It appears fine in Wireshark. I can't find anything online about this particular error message.
I am trying to query a device for specific sensors, and get ASN1_ERROR_ERR depending on the number of oids that I specify. My code looks like:
target.setObjectIDList(objID);
resultArray = target.snmpGetVariableBindings();
The 'target' variable is a com.adventnet.snmp.beans.SnmpTarget and the objID is String array of oids. The oids are all coming from the same MIB table. When I specify 8 of them, it works: resultArray is non-null, contains the expected values, and target.getErrorCode() returns 0 (No Error). When I specify 9 oids, resultArray is null and target.getErrorCode() is 50 (which is ASN1_ERROR_ERR: 'SNMP ASN1Error encountered due to Illegal SNMP packet received from [my device's ip]). It doesn't seem to matter which oids I specify, and each work if specified on their own.