[SNMP4J] TreeUtils & DefaultPDUFactory

Frank Fock fock at agentpp.com
Wed Oct 5 22:50:43 CEST 2016


Hi Ron,

You can upgrade to the latest SNMP4J version 2.5.2 and the issue you
described should disappear.

You can also fix the issue, with version 2.5.0 by setting the context 
engine ID
to an empty OctetString in the Factory constructor. SNMP4J will then
automatically replace the empty string with the discovered authoritative
engine ID.

Best regards,
Frank

Am 05.10.2016 um 16:13 schrieb Ronald Braswell:
> I am attempting to use TreeUtils with a DefaultPDUFactory using GETNEXT
> (the OID range is small).
>
> I have set engine discovery for USM during the initialization of the
> program to true.
>
> The target uses V3 and USM.     I have successfully polled the target and
> have successfully received traps from the target without specifying the
> engineID when adding the UsmUser.
>
> However, when I use TreeUtils as described above, it fails with 'Context
> engine ID must not be null' at org.snmp4j.ScopedPDU.setContextEngineID()
> line 69.
>
> I am using SNMP4j version 2.5.
>
> I notice using wireshark that a get-request is sent to the device to elicit
> the report PDU from which it can discover the authoritative engine ID.
> There are two packets sent from the manager to the target and the target
> responds to each.   I would assume that the packets are encrypted getnext
> packets with the responses appropriate to the requests.
>
> When using the DefaultPDUFactory, do I need to specify the authoritative
> engine for the user when adding the user to USM even though when polling
> and I specify the PDU this is not necessary?
>
> Ron
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> https://oosnmp.net/mailman/listinfo/snmp4j

-- 
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231




More information about the SNMP4J mailing list