[AGENT++] RE: Problems with sending SNMPv3 traps after agent restart

Jochen Katz katz at agentpp.com
Tue Apr 29 22:14:49 CEST 2008


Hi Alex,

> First of all, I attached debug logs to the end of this mail. Second -
> I've been debugging this issue closely, and as far as I can tell it's
> caused by the fact that for the UsmUserTable entries that are loaded
> from the persistent storage, there is no corresponding entry neither
> in USM->usm_user_table, nor in USM->usm_user_name_table. As a result
> of that, when AGENT++ performs EngineID discovery and processes the
> REPORT reply - it can't find USM user name.

yes, when loading tables from file, the users are not added to USM 
(because the MibTable rows are added in a way that does not trigger the 
call to the USM add_user function).

> As a temporary solution to the problem, I modified my code as
> follows:
> 
> // when MIB is changed
 > m_mib->save_all();
> m_v3mp->get_usm()->save_users(D_USM_USERS_FILE); 
> m_v3mp->get_usm()->save_localized_users(D_USM_LOCALIZED_USERS_FILE);
> 
> ...
> 
> // at startup
 > m_mib->init();
> m_v3mp->get_usm()->load_users(D_USM_USERS_FILE); 
> m_v3mp->get_usm()->load_localized_users(D_USM_LOCALIZED_USERS_FILE);
> 
> This seems to solve the problem with the TRAP. However it looks to me
> more like a workaround than as a real solution. What do you think?

Yes, the USM load/save functions were added for manager applications and 
should not be needed in agents, so you're indeed using a workaround.

I will fix the UsmUserTable class for the next release. Then also the 
two fixes (595-598 and 602-604) from your last mail are included. For 
the remainig I will first have to think about.

Regards,
   Jochen



More information about the AGENTPP mailing list