[SNMP4J] Debugging Agent

Oleg Barenboim obarenboim at evidentsoftware.com
Tue Mar 21 16:00:36 CET 2006


Hi Frank,

Tried the following with similar results (-v 1 game similar output).
Perhaps you have some more debugging suggestions.  

FYI, I turned off all the SNMP services in Windows so as to not
interfere with your software.  

Regards,
Oleg


$ snmpwalk --help
c:\Program Files\HP OpenView\bin\snmpwalk.exe: illegal option -- -
usage: snmpwalk [options] node [object-id]...

       Options:
           -d                  dump ASN.1 packet trace
           -v version          protocol version (1 or 2c)
           -c community        community string
           -p port             remote port
           -t timeout          retransmission timeout (1/10th seconds)
           -r retries          maximum retransmission attempts
           -T                  print the OID in dotted decimal format.

$ snmpwalk -d -v 2c -t 100 -c "public" 127.0.0.1
Transmitted 34 bytes to barenboim01.evidentsoftware.com (172.31.2.125)
port 161:
Initial Timeout: 10.00 seconds
     0:  30 20 02 01 01 04 06 70 75 62 6c 69 63 a1 13 02
0.....public...
    16:  02 2a 8a 02 01 00 02 01 00 30 07 30 05 06 01 2b
*.......0.0...+
    32:  05 00 -- -- -- -- -- -- -- -- -- -- -- -- -- --
...............

     0:  SNMP MESSAGE (0x30): 32 bytes
     2:    INTEGER VERSION (0x2) 1 bytes: 1 (SNMPv2C)
     5:    OCTET-STR COMMUNITY (0x4) 6 bytes: "public"
    13:    GETNEXT-REQUEST-PDU (0xa1): 19 bytes
    15:      INTEGER REQUEST-ID (0x2) 2 bytes: 10890
    19:      INTEGER ERROR-STATUS (0x2) 1 bytes: noError(0)
    22:      INTEGER ERROR-INDEX (0x2) 1 bytes: 0
    25:      SEQUENCE VARBIND-LIST (0x30): 7 bytes
    27:        SEQUENCE VARBIND (0x30): 5 bytes
    29:          OBJ-ID (0x6) 1 bytes: .1.3
    32:          NULL (0x5) 0 bytes


Transmitted 34 bytes to barenboim01.evidentsoftware.com (172.31.2.125)
port 161:
Retry #1  Timeout: 20.00 seconds
     0:  30 20 02 01 01 04 06 70 75 62 6c 69 63 a1 13 02
0.....public...
    16:  02 2a 8a 02 01 00 02 01 00 30 07 30 05 06 01 2b
*.......0.0...+
    32:  05 00 -- -- -- -- -- -- -- -- -- -- -- -- -- --
...............

     0:  SNMP MESSAGE (0x30): 32 bytes
     2:    INTEGER VERSION (0x2) 1 bytes: 1 (SNMPv2C)
     5:    OCTET-STR COMMUNITY (0x4) 6 bytes: "public"
    13:    GETNEXT-REQUEST-PDU (0xa1): 19 bytes
    15:      INTEGER REQUEST-ID (0x2) 2 bytes: 10890
    19:      INTEGER ERROR-STATUS (0x2) 1 bytes: noError(0)
    22:      INTEGER ERROR-INDEX (0x2) 1 bytes: 0
    25:      SEQUENCE VARBIND-LIST (0x30): 7 bytes
    27:        SEQUENCE VARBIND (0x30): 5 bytes
    29:          OBJ-ID (0x6) 1 bytes: .1.3
    32:          NULL (0x5) 0 bytes



-----Original Message-----
From: Frank Fock [mailto:fock at agentpp.com] 
Sent: Monday, March 20, 2006 6:10 PM
To: Oleg Barenboim
Cc: snmp4j at agentpp.org
Subject: Re: [SNMP4J] Debugging Agent

Hi Oleg,

Did you specify all necessary parameters for the snmpwalk
command? I think, SNMP version and security parameters
(community) are missing. Probably also the correct port.

Best regards,
Frank

Oleg Barenboim wrote:
> Hi Frank,
> 
>  
> 
> I am still plugging away at getting a "Hello World" agent to work.  I
> have liberally sprinkled log messages throughout the code to see where
I
> can catch things.
> 
>  
> 
> When I try to hit it with Net-SNMP's snmpwalk, I get the following:
> 
>  
> 
> $ snmpwalk 127.0.0.1
> 
> snmpwalk: No response arrived before timeout.
> 
>  
> 
> Do you have any ideas for debugging the agent to see if it is
receiving
> anything?
> 
>  
> 
> Thanks in advance,
> 
> Oleg
> 
>  
> 
> The (test) agent seems to start on Windows with the following
messages:
> 
>  
> 
> Evident Agent - Initializing Transport Mappings
> 
> DefaultUdpTransportMapping << 127.0.0.1/161
> 
> DefaultUdpTransportMapping -- DatagramSocket(161,/127.0.0.1);
> 
> 0 [main] INFO org.snmp4j.agent.BaseAgent  - Initializing Message
> Dispatcher
> 
> 40 [main] INFO org.snmp4j.agent.BaseAgent  - Engine boots is: 12
> 
> 60 [main] INFO org.snmp4j.agent.BaseAgent  - Wrote boot counter: 13
> 
> 130 [main] DEBUG org.snmp4j.security.Salt  - Initialized Salt to
> db5b34b50fd0c404.
> 
> Evident Agent - Adding USM User
> 
> 761 [main] DEBUG org.snmp4j.security.AuthGeneric  - SHA-1First digest:
> 85:84:4e:de:31:ec:6a:d2:30:00:21:be:c1:98:e3:e9:f9:05:42:89
> 
> 761 [main] DEBUG org.snmp4j.security.AuthGeneric  - SHA-1localized
key:
> 02:c2:ea:b8:ab:ca:2a:3a:7a:41:55:25:e4:c3:9a:3a:8a:41:80:df
> 
> 851 [main] DEBUG org.snmp4j.security.AuthGeneric  - SHA-1First digest:
> 8a:be:fa:f6:ee:86:6a:49:70:c9:df:de:80:be:86:b3:23:3c:71:63
> 
> 851 [main] DEBUG org.snmp4j.security.AuthGeneric  - SHA-1localized
key:
> 46:ad:2f:60:91:21:54:e1:30:19:b3:ec:9b:86:18:18:1b:6e:44:13
> 
> 861 [main] DEBUG org.snmp4j.security.UsmUserTable  - Adding user
SHADES
> =
>
UsmUser[secName=SHADES,authProtocol=1.3.6.1.6.3.10.1.1.3,authPassphrase=
>
SHADESAuthPassword,privProtocol=1.3.6.1.6.3.10.1.2.2,privPassphrase=SHAD
> ESPrivPassword,localizationEngineID=null]
> 
> 1091 [main] DEBUG org.snmp4j.security.AuthGeneric  - SHA-1First
digest:
> 9f:b5:cc:03:81:49:7b:37:93:52:89:39:ff:78:8d:5d:79:14:52:11
> 
> 1091 [main] DEBUG org.snmp4j.security.AuthGeneric  - SHA-1localized
key:
> 91:a5:0f:03:c2:f9:6f:9a:96:dd:ab:d5:84:c6:f9:ba:a7:eb:4b:43
> 
> 1161 [main] DEBUG org.snmp4j.security.AuthGeneric  - SHA-1First
digest:
> 9f:b5:cc:03:81:49:7b:37:93:52:89:39:ff:78:8d:5d:79:14:52:11
> 
> 1161 [main] DEBUG org.snmp4j.security.AuthGeneric  - SHA-1localized
key:
> 91:a5:0f:03:c2:f9:6f:9a:96:dd:ab:d5:84:c6:f9:ba:a7:eb:4b:43
> 
> 1161 [main] DEBUG org.snmp4j.security.UsmUserTable  - Adding user TEST
=
>
UsmUser[secName=TEST,authProtocol=1.3.6.1.6.3.10.1.1.3,authPassphrase=ma
>
plesyrup,privProtocol=1.3.6.1.6.3.10.1.2.2,privPassphrase=maplesyrup,loc
> alizationEngineID=null]
> 
> 1231 [main] DEBUG org.snmp4j.security.AuthGeneric  - SHA-1First
digest:
> df:9b:a9:07:99:14:5b:29:18:9e:88:67:46:19:6d:5c:62:50:19:f1
> 
> 1512 [main] DEBUG org.snmp4j.security.AuthGeneric  - SHA-1localized
key:
> de:c0:57:57:b6:33:30:21:d7:82:47:5b:3c:fd:a8:36:17:d6:49:95
> 
> 1512 [main] DEBUG org.snmp4j.security.UsmUserTable  - Adding user SHA
=
>
UsmUser[secName=SHA,authProtocol=1.3.6.1.6.3.10.1.1.3,authPassphrase=SHA
>
AuthPassword,privProtocol=null,privPassphrase=null,localizationEngineID=
> null]
> 
> Evident Agent - Registering Managed Objects
> 
> Evident Agent - Creating Static If Table
> 
> Evident Agent - Adding Views
> 
> Evident Agent - Adding Notification Targets
> 
> 1562 [main] INFO org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl
-
> Notification 1.3.6.1.6.3.1.1.5.1 issued with []
> 
> 1562 [main] DEBUG org.snmp4j.agent.mo.snmp.VacmMIB  - VACM access
> requested for context=, securityName=public, securityModel=2,
> securityLevel=1, viewType=0, OID=1.3.6.1.6.3.1.1.5.1
> 
> 1562 [main] DEBUG org.snmp4j.agent.mo.snmp.VacmMIB  - Matching view
> found for group name 'v1v2group' is 'fullNotifyView'
> 
> 1562 [main] DEBUG org.snmp4j.agent.mo.snmp.VacmMIB  - Access allowed
for
> view 'fullNotifyView' by subtree 1.3 for OID 1.3.6.1.6.3.1.1.5.1
> 
> 1572 [main] INFO org.snmp4j.MessageDispatcherImpl  - Sending PDU
> 
> 1602 [main] INFO org.snmp4j.MessageDispatcherImpl  - Sending Message
to
> 127.0.0.1/162
> 
> 1602 [main] DEBUG org.snmp4j.transport.DefaultUdpTransportMapping  -
> Sending message to 127.0.0.1/162 with length 70:
>
30:44:02:01:01:04:06:70:75:62:6c:69:63:a7:37:02:04:7c:28:40:21:02:01:00:
>
02:01:00:30:29:30:0e:06:08:2b:06:01:02:01:01:03:00:43:02:00:87:30:17:06:
> 0a:2b:06:01:06:03:01:01:04:01:00:06:09:2b:06:01:06:03:01:01:05:01
> 
> 1612 [main] INFO org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl
-
> Sent notification TRAP[requestID=2083012641, errorStatus=Success(0),
> errorIndex=0, VBS[1.3.6.1.2.1.1.3.0 = 0:00:01.35;
1.3.6.1.6.3.1.1.4.1.0
> = 1.3.6.1.6.3.1.1.5.1]] to CommunityTarget[address=127.0.0.1/162,
> version=1, timeout=2000, retries=1, community=public]
> 
> Evident Agent - Loading Config File
> 
> 1612 [main] INFO org.snmp4j.agent.BaseAgent  - Processing Config File:
> EvidentAgentConfig.cfg
> 
> 1612 [main] ERROR org.snmp4j.agent.BaseAgent  -
> java.io.FileNotFoundException: EvidentAgentConfig.cfg (The system
cannot
> find the file specified)
> 
> Evident Agent - Adding Shutdown Hook
> 
> Evident Agent - Running
> 
> 1622 [main] INFO org.snmp4j.agent.BaseAgent  -
> Running....Session=org.snmp4j.Snmp at 1cde100
> 
> 1642 [DefaultUDPTransportMapping_127.0.0.1/161] INFO
> org.snmp4j.transport.DefaultUdpTransportMapping  - UDP receive buffer
> size for socket 127.0.0.1/161 is set to: 8192
> 
>  
> 
>  
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list