[SNMP4J] About SNMP4J

Mauricio Reyes maure5 at hotmail.com
Mon Mar 7 19:24:50 CET 2005


Hello,

I modifyed the code to this:
if (version == SnmpConstants.version3)
{
      byte[] tt={01,02,03,04,05,06};
      System.out.println("engineID: "+new 
OctetString(/*MPv3.createLocalEngineID()*/tt));
      USM usm = new USM(SecurityProtocols.getInstance(),new 
OctetString(/*MPv3.createLocalEngineID()*/tt), 0);
      SecurityModels.getInstance().addSecurityModel(usm);
      addUsmUser(snmp);
}

It prints out engineID: 01:02:03:04:05:06

And on the snmptrapd.conf I have this:

createUser -e 010203040506 mtest MD5 mmprueba DES mmprueba

Bu I still receive the same error on the snmptrapd demon.

Any idea what can be the problem?

Thanks for your help. Sorry to bother you so much.

Mauricio.

>From: Frank Fock <fock at agentpp.com>
>To: Mauricio Reyes <maure5 at hotmail.com>
>CC: katz at agentpp.com,  snmp4j at agentpp.org
>Subject: Re: [SNMP4J] About SNMP4J
>Date: Mon, 07 Mar 2005 08:58:08 +0100
>
>Hi Mauricio,
>
>a SNMP engine ID must have a length of at least 5 bytes and may
>have a length up to 32 bytes. Your engine ID configuration results
>in two bytes (0x12 and 0x34) which is not what you have used in
>SNMP4J (0x1, 0x2, 0x3, and 0x4). Please use the same engine ID
>with at least five bytes for both.
>
>Best regards,
>Frank
>
>Mauricio Reyes wrote:
>
>>
>>Hello Jochen,
>>
>>Using the option snmptrapd -f -Le -Dusm, I get: usm: Unknown User(mtest)
>>
>>On the snmptrapd.conf file I have this:
>>
>>rwuser initial
>># lets add the new user we'll create too:
>>rwuser mtest
>># USM configuration entries
>>createUser -e 1234 mtest MD5 mprueba DES mprueba
>>
>>With the snmpd demon traps are received correctly. But when creating traps 
>>with SNMP4J I get this on the snmptrapd demon:
>>
>>2005-03-05 01:29:02 NET-SNMP version 5.2.1 Started.
>>usm: USM processing begun...
>>usm: Unknown User(mtest)
>>
>>Thanks a lot,
>>Mauricio
>>
>>>From: Jochen Katz <katz at agentpp.com>
>>>To: snmp4j at agentpp.org
>>>Subject: Re: [SNMP4J] About SNMP4J
>>>Date: Fri, 04 Mar 2005 19:24:51 +0100
>>>
>>>Hi,
>>>
>>>>I've tryied to modify the code so that I can send SNMPv3 Traps with 
>>>>SNMP4J to net-snmp. I modified the MPv3.createLocalEngineID(), with 
>>>>another engineID created like this:
>>>>     byte[] tt={1,2,3,4};
>>>>     USM usm = new USM(SecurityProtocols.getInstance(),
>>>>                        new OctetString(tt), 0);
>>>>Both in listen() and createSnmpSession(). Am I doing something wrong?
>>>
>>>
>>>these changes are ok (I thought about these two changes). Did you verify 
>>>that the NetSNMP trapd really uses the configuration from the config file 
>>>and not some saved values from /var/lib/net-snmp/? What report/error do 
>>>you get?
>>>
>>>Regards,
>>>   Jochen
>>>
>>>
>>>
>>>_______________________________________________
>>>SNMP4J mailing list
>>>SNMP4J at agentpp.org
>>>http://lists.agentpp.org/mailman/listinfo/snmp4j
>>
>>
>>_________________________________________________________________
>>Express yourself instantly with MSN Messenger! Download today it's FREE! 
>>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>
>>_______________________________________________
>>SNMP4J mailing list
>>SNMP4J at agentpp.org
>>http://lists.agentpp.org/mailman/listinfo/snmp4j
>>
>
>

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/




More information about the SNMP4J mailing list