[SNMP4J] Unknown engine ID

Marcel Bassuener Marcel.Bassuener at unibw.de
Sun Nov 28 12:46:44 CET 2010


Now I get a different message, but it changes from time to time. It 
seems to me that the engine ID didn't change. 
(securityEngineID=80:00:13:70:01:c0:a8:0b:02 the same as befor) But if I 
set the Timeout of the UserTarget to 1500 everything works. Why??? Why 
does it take so long to recieve a message (ca. 1050 millis). Where is my 
fault??

thanks
marshall


455598 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG 
org.snmp4j.transport.DefaultUdpTransportMapping  - Received message from 
/127.0.0.1/50829 with length 119: 
30:75:02:01:03:30:11:02:04:13:7c:ec:60:02:03:00:ff:ff:04:01:07:02:01:03:04:33:30:31:04:09:80:00:13:70:01:c0:a8:0b:02:02:01:00:02:01:01:04:06:53:48:41:44:45:53:04:0c:46:ca:a7:e5:f5:70:6c:3b:3a:9e:b6:c1:04:08:00:00:00:00:ea:ab:15:c1:04:28:9f:92:cc:35:7a:e3:bf:8e:59:e5:51:7a:56:1d:6d:82:81:e2:90:36:f3:19:b3:bd:58:e3:ee:09:88:69:a8:b9:d9:cf:f3:8b:98:5c:32:3f
455600 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG 
org.snmp4j.mp.MPv3  - SNMPv3 header decoded: msgId=326954080, 
msgMaxSize=65535, msgFlags=07, secModel=3
455600 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG 
org.snmp4j.security.USM  - getUser(engineID=80:00:13:70:01:c0:a8:0b:02, 
securityName=SHADES)
455600 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG 
org.snmp4j.security.UsmTimeTable  - CheckTime: received message outside 
time window (authorative):engineBoots differ
455600 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG 
org.snmp4j.security.USM  - RFC3414 §3.2.7.a Not in time window; 
engineID='80:00:13:70:01:c0:a8:0b:02', engineBoots=0, engineTime=1
455600 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG 
org.snmp4j.mp.MPv3  - Adding cache entry: 
StateReference[msgID=326954080,pduHandle=PduHandle[1336303011],securityEngineID=80:00:13:70:01:c0:a8:0b:02,securityModel=org.snmp4j.security.USM at 1b16e52,securityName=SHADES,securityLevel=3,contextEngineID=,contextName=]
455601 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG 
org.snmp4j.mp.MPv3  - Removed cache entry: 
StateReference[msgID=326954080,pduHandle=PduHandle[1336303011],securityEngineID=80:00:13:70:01:c0:a8:0b:02,securityModel=org.snmp4j.security.USM at 1b16e52,securityName=SHADES,securityLevel=3,contextEngineID=,contextName=]
455602 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG 
org.snmp4j.security.USM  - RFC3414 §3.1.4.b Outgoing message is not 
encrypted
455602 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG 
org.snmp4j.transport.DefaultUdpTransportMapping  - Sending message to 
127.0.0.1/50829 with length 106: 
30:68:02:01:03:30:11:02:04:13:7c:ec:60:02:03:00:ff:ff:04:01:01:02:01:03:04:2c:30:2a:04:09:80:00:13:70:01:c0:a8:0b:02:02:01:12:02:02:01:c7:04:06:53:48:41:44:45:53:04:0c:fc:23:e4:96:9d:e3:77:df:ad:be:7c:d3:04:00:30:22:04:00:04:00:a8:1c:02:01:00:02:01:00:02:01:00:30:11:30:0f:06:0a:2b:06:01:06:03:0f:01:01:02:00:41:01:08
455602 [DefaultUDPTransportMapping_127.0.0.1/161] WARN 
org.snmp4j.MessageDispatcherImpl  - 1.3.6.1.6.3.15.1.1.2.0 = 8

Am 28.11.2010 00:56, schrieb Marcel Bassuener:
> I change it to an static value, but I get the same error message:
>
> OctetString localEngineID = new OctetString("80:00:13:70:01:c0:a8:0b:05");
>
> Am 27.11.2010 23:50, schrieb Frank Fock:
>> Hi Marcel,
>>
>> You need to choose a different engine ID
>> as the agent, that's all.
>>
>> Best regards,
>> Frank
>>
>> On 27.11.2010 22:57, Marcel Bassuener wrote:
>>> Hi,
>>> I have a problem. I wrote an SNMP Agent, which works (I tested it with
>>> an other programm).  But now I tried to write my own manager and send
>>> messages. Every time I start it the agent says: (Unknown engine ID)
>>>
>>> 3283585 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG
>>> org.snmp4j.transport.DefaultUdpTransportMapping  - Received message from
>>> /127.0.0.1/63167 with length 61:
>>> 30:3b:02:01:03:30:11:02:04:05:e4:af:d7:02:03:00:ff:ff:04:01:04:02:01:03:04:10:30:0e:04:00:02:01:00:02:01:00:04:00:04:00:04:00:30:11:04:00:04:00:a0:0b:02:01:00:02:01:00:02:01:00:30:00
>>> 3283585 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG
>>> org.snmp4j.mp.MPv3  - SNMPv3 header decoded: msgId=98873303,
>>> msgMaxSize=65535, msgFlags=04, secModel=3
>>> 3283585 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG
>>> org.snmp4j.security.USM  - RFC3414 §3.2.3 Unknown engine ID:
>>> 3283586 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG
>>> org.snmp4j.mp.MPv3  - Adding cache entry:
>>> StateReference[msgID=98873303,pduHandle=PduHandle[1990949864],securityEngineID=,securityModel=org.snmp4j.security.USM at c5c3ac,securityName=,securityLevel=1,contextEngineID=,contextName=]
>>> 3283587 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG
>>> org.snmp4j.mp.MPv3  - Removed cache entry:
>>> StateReference[msgID=98873303,pduHandle=PduHandle[1990949864],securityEngineID=,securityModel=org.snmp4j.security.USM at c5c3ac,securityName=,securityLevel=1,contextEngineID=,contextName=]
>>> 3283587 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG
>>> org.snmp4j.security.USM  - RFC3414 §3.1.4.b Outgoing message is not
>>> encrypted
>>> 3283587 [DefaultUDPTransportMapping_127.0.0.1/161] DEBUG
>>> org.snmp4j.transport.DefaultUdpTransportMapping  - Sending message to
>>> 127.0.0.1/63167 with length 87:
>>> 30:55:02:01:03:30:11:02:04:05:e4:af:d7:02:03:00:ff:ff:04:01:00:02:01:03:04:19:30:17:04:09:80:00:13:70:01:c0:a8:0b:02:02:01:00:02:01:00:04:00:04:00:04:00:30:22:04:00:04:00:a8:1c:02:01:00:02:01:00:02:01:00:30:11:30:0f:06:0a:2b:06:01:06:03:0f:01:01:04:00:41:01:22
>>> 3283587 [DefaultUDPTransportMapping_127.0.0.1/161] WARN
>>> org.snmp4j.MessageDispatcherImpl  - 1.3.6.1.6.3.15.1.1.4.0 = 34
>>>
>>>
>>> Here my code:
>>>
>>> Snmp snmp =  new Snmp(new DefaultUdpTransportMapping());
>>>
>>>             OctetString localEngineID = new
>>> OctetString(MPv3.createLocalEngineID());
>>>
>>>             ((MPv3)snmp.getMessageProcessingModel(MPv3.ID)).
>>>                 setLocalEngineID(localEngineID.getValue());
>>>
>>>             USM usm = new USM(SecurityProtocols.getInstance(),
>>>                                 localEngineID,
>>>                                 0);
>>>               SecurityModels.getInstance().addSecurityModel(usm);
>>>               snmp.getUSM().addUser(new OctetString("SHADES"),new
>>> UsmUser(new OctetString("SHADES"),
>>>                       AuthSHA.ID,
>>>                       new OctetString("SHADESAuthPassword"),
>>>                       PrivDES.ID,
>>>                       new OctetString("SHADESPrivPassword")));
>>>
>>>             UserTarget target = new UserTarget();
>>>             target.setSecurityLevel(SecurityLevel.AUTH_PRIV);
>>>             target.setSecurityName(new OctetString("SHADES"));
>>>             target.setVersion(SnmpConstants.version3);
>>>             target.setAddress(new UdpAddress("127.0.0.1/161"));
>>>             target.setRetries(1);
>>>             target.setTimeout(500);
>>> //        target.setMaxSizeRequestPDU(maxSizeResponsePDU);
>>>             snmp.listen();
>>>
>>>             ScopedPDU request = new ScopedPDU();
>>>             request.setType(PDU.GET);//createPDU(target);
>>>             if (request.getType() == PDU.GETBULK) {
>>>               request.setMaxRepetitions(50);
>>>               request.setNonRepeaters(1);
>>>             }
>>>             request.add(new VariableBinding(new OID("0.1.0")));
>>>
>>>             PDU response = null;
>>>               ResponseEvent responseEvent;
>>>               long startTime = System.currentTimeMillis();
>>>               responseEvent = snmp.send(request, target);
>>>               if (responseEvent != null) {
>>>                 response = responseEvent.getResponse();
>>>                 System.out.println("Received response after "+
>>>                                    (System.currentTimeMillis()-startTime)+"
>>> millis"+response.getVariableBindings());
>>>             }
>>>             snmp.close();
>>>
>>> Please help me!!
>>>
>>> Thanks and Best regards
>>> Marshall
>>> _______________________________________________
>>> SNMP4J mailing list
>>> SNMP4J at agentpp.org
>>> http://lists.agentpp.org/mailman/listinfo/snmp4j
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j




More information about the SNMP4J mailing list