discoverAuthoritativeEngineID returns null , intermittently

Hi,

We are using the below code to discover authoritative engine Id to add users to the local user table in order to receive v3 traps.
authoritativeEngineId = snmp.discoverAuthoritativeEngineID(address,1000);

We have been observing a behavior that the engineId is being returned null by the method, intermittently. We had to increase the timeout to almost 7 mins and then retry to get the non-null engineId.

          authoritativeEngineId = snmp.discoverAuthoritativeEngineID(address,500000);

Packet capture shows the proper device response with engine details for the empty PDU sent, but still this response is ignored until the timeout is met. Please see the screenshots.

2022-09-01 10:01:35 - get-request sent
2022-09-01 10:01:35 - device response report SNMP-USER-BASED-SM-MIB::usmStatsUnknownEngineIDs.0

This response is ignored.

2022-09-01 10:08:12 - get-request sent part of retry after timeout
2022-09-01 10:08:12 report SNMP-USER-BASED-SM-MIB::usmStatsUnknownEngineIDs.0

This response is considered and engineId was properly discovered. Due to this delay in discovering engineId , we are not able to receive traps. Can you please let us know what can cause this delay in discovering the engineId , even when the device is responding properly.


Thanks,
Keertana

Which SNMP4J version are you using?

2.8.12
snmp4jVersion = “2.8.12”

Thanks for providing the version, next please provide the debug log output of SNMP4J when the REPORT PDU is “ignored” and when it is not “ignored”.