[SNMP4J] TestAgent and SNMP4J V.3 cooperation

Jakub Olszak viewior at gmail.com
Wed Jul 15 17:00:05 CEST 2009


Hello all,
I have two eclipse projects. First one is only TestAgent.java class with
changed
super(bootCounterFile, configFile,
  new CommandProcessor(OctetString.fromHexString("00:00:00:00:00:00:02",
':')));
second one is example from java doc of snmp4j class.
Ports and users are ok because ther weren't changed
all I want is to  get this :
PDU pdu = new ScopedPDU();
  pdu.add(new VariableBinding(new OID("1.3.6.1.2")));
  pdu.setType(PDU.GET);
sending from smnp4j instance to TestAgent.
They are communicating but I don't get good response:
result from SNMP4J:
REPORT[reqestID=0, errorStatus=0, errorIndex=0, VBS[1.3.6.1.6.3.15.1.1.5.0 =
2]]
127.0.0.1/161

result from TestAgent:
last lines before starting snmp4j:
581 [main] DEBUG org.snmp4j.agent.mo.snmp.VacmMIB - VACM access requested
for context=, securityName=v3notify, securityModel=3, securityLevel=1,
viewType=0, OID=1.3.6.1.6.3.1.1.5.1
582 [main] DEBUG org.snmp4j.agent.mo.snmp.VacmMIB - Found group name
'v3group' for secName 'v3notify' and secModel 3
582 [main] DEBUG org.snmp4j.agent.mo.snmp.VacmMIB - Got views
[DefaultMOMutableRow2PC[index=7.118.51.103.114.111.117.112.0.3.3,values=[1,
fullReadView, fullWriteView, fullNotifyView, 3, 1]] for group name 'v3group'
582 [main] DEBUG org.snmp4j.agent.mo.snmp.VacmMIB - Matching against access
entry
DefaultMOMutableRow2PC[index=7.118.51.103.114.111.117.112.0.3.3,values=[1,
fullReadView, fullWriteView, fullNotifyView, 3, 1] with
exactContextMatch=true, prefixMatch=false, matchSecModel=true and
matchSecLevel=false
582 [main] WARN org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl - Access
denied by VACM for 1.3.6.1.6.3.1.1.5.1

and last lines after sending this pdu:
582 [main] WARN org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl - Access
denied by VACM for 1.3.6.1.6.3.1.1.5.1
48023 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG
org.snmp4j.transport.DefaultUdpTransportMapping - Received message from /
127.0.0.1/54157 with length 61:
30:3b:02:01:03:30:11:02:04:6b:2b:ba:7a: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
48028 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.mp.MPv3 -
SNMPv3 header decoded: msgId=1798027898, msgMaxSize=65535, msgFlags=04,
secModel=3
48030 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.security.USM
- RFC3414 §3.2.3 Unknown engine ID:
48031 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.mp.MPv3 -
Adding cache entry:
StateReference[msgID=1798027898,pduHandle=PduHandle[1522477561],securityEngineID=,securityModel=org.snmp4j.security.USM at 60420f
,securityName=,securityLevel=1,contextEngineID=,contextName=]
48031 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.mp.MPv3 -
Removed cache entry:
StateReference[msgID=1798027898,pduHandle=PduHandle[1522477561],securityEngineID=,securityModel=org.snmp4j.security.USM at 60420f
,securityName=,securityLevel=1,contextEngineID=,contextName=]
48031 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.security.USM
- RFC3414 §3.1.4.b Outgoing message is not encrypted
48031 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG
org.snmp4j.transport.DefaultUdpTransportMapping - Sending message to
127.0.0.1/54157 with length 85:
30:53:02:01:03:30:11:02:04:6b:2b:ba:7a:02:03:00:ff:ff:04:01:00:02:01:03:04:17:30:15:04:07:00:00:00:00:00:00: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:01
48032 [DefaultUDPTransportMapping_0.0.0.0/161] WARN
org.snmp4j.MessageDispatcherImpl - 1.3.6.1.6.3.15.1.1.4.0 = 1
48318 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG
org.snmp4j.transport.DefaultUdpTransportMapping - Received message from /
127.0.0.1/54157 with length 117:
30:73:02:01:03:30:11:02:04:6b:2b:ba:7b:02:03:00:ff:ff:04:01:07:02:01:03:04:31:30:2f:04:07:00:00:00:00:00:00:02:02:01:00:02:01:00:04:06:4d:44:35:44:45:53:04:0c:a0:db:f3:89:1d:de:ec:e4:49:72:9a:1c:04:08:00:00:00:00:89:0f:f2:dd:04:28:e9:4f:84:d3:24:fe:ea:10:ec:9d:01:14:a6:35:f1:44:2b:51:40:2d:49:8d:6a:c1:3c:20:01:42:bc:8c:18:ad:f7:4e:dc:66:cb:ac:02:52
48318 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.mp.MPv3 -
SNMPv3 header decoded: msgId=1798027899, msgMaxSize=65535, msgFlags=07,
secModel=3
48318 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.security.USM
- getUser(engineID=00:00:00:00:00:00:02, securityName=MD5DES)
48319 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.security.USM
- RFC3414 §3.2.6 Wrong digest -> authentication failure:
a0:db:f3:89:1d:de:ec:e4:49:72:9a:1c
48319 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.mp.MPv3 -
Adding cache entry:
StateReference[msgID=1798027899,pduHandle=PduHandle[1522477562],securityEngineID=00:00:00:00:00:00:02,securityModel=org.snmp4j.security.USM at 60420f
,securityName=MD5DES,securityLevel=3,contextEngineID=,contextName=]
48320 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.mp.MPv3 -
Removed cache entry:
StateReference[msgID=1798027899,pduHandle=PduHandle[1522477562],securityEngineID=00:00:00:00:00:00:02,securityModel=org.snmp4j.security.USM at 60420f
,securityName=MD5DES,securityLevel=3,contextEngineID=,contextName=]
48320 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG org.snmp4j.security.USM
- RFC3414 §3.1.4.b Outgoing message is not encrypted
48320 [DefaultUDPTransportMapping_0.0.0.0/161] DEBUG
org.snmp4j.transport.DefaultUdpTransportMapping - Sending message to
127.0.0.1/54157 with length 91:
30:59:02:01:03:30:11:02:04:6b:2b:ba:7b:02:03:00:ff:ff:04:01:00:02:01:03:04:1d:30:1b:04:07:00:00:00:00:00:00:02:02:01:00:02:01:00:04:06:4d:44:35:44:45:53: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:05:00:41:01:01
48321 [DefaultUDPTransportMapping_0.0.0.0/161] WARN
org.snmp4j.MessageDispatcherImpl - 1.3.6.1.6.3.15.1.1.5.0 = 1
What is the reason ?? :|
Regards



More information about the SNMP4J mailing list