[AGENT++] SNMP++ library suddenly giving SNMPException: SNMPv3: USM: Unknown SecurityName

Jochen Katz katz at agentpp.com
Fri Feb 22 22:58:09 CET 2019


Hi,

> we suddenly get SNMPException: SNMPv3: USM: Unknown SecurityName from
> library.

unless your code does not translate a received report message, this is a
local error and something seems to go wrong.

> On all devices there is same user created with same authentication
> and privacy passwords.

How do you add the user? Do you add the user with passwords to USM and
use the engineId discovery to add the localized users on first message
exchange? Or do you add the localized users for each device?
Do you add the users only once ore do you add and delete the users for
every request?

> Some log snippets where we do get initial data:
> 
> DEBUG:  10.x.x.x: getMACAddresses(): queries failed: SNMPv3: USM:
> Unknown SecurityName

This most likely indicates a local error: Either the user table got
corrupted or the user was removed. Therefore the questions above.

As the log messages are all from your code: Could you turn on logging in
snmp++ and test again?

> My initial understanding is, because we are scanning devices
> concurrently, is it a case that SNMP++ library somehow mixing up
> session of other device with this device as they all have same user
> and passwords? Is it a known defect?

No, snmp++ should be thread safe, so snmp++ should handle your requests.

> I also don't know if this is
> coming from device agent directly or internal to SNMP++.

It is a local error.

> I tried
> looking into packet captures but as they are encrypted can't really
> say on that side.

In the Wireshark configuration you can add your SNMPv3 users, so
Wireshark can decrypt the messages for you.

Regards,
  Jochen


More information about the AGENTPP mailing list