[SNMP4J] Re:SNMP4J Digest, Vol 41, Issue 15

通子 ytsun04 at 163.com
Mon Jun 25 09:15:22 CEST 2007


The OID of scalar object  should be end with 0. For example,
1.3.6.1.4.1.28867.2.1.0

?2007-06-23?snmp4j-request at agentpp.org ???
>Send SNMP4J mailing list submissions to
>	snmp4j at agentpp.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>	http://lists.agentpp.org/mailman/listinfo/snmp4j
>or, via email, send a message with subject or body 'help' to
>	snmp4j-request at agentpp.org
>
>You can reach the person managing the list at
>	snmp4j-owner at agentpp.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of SNMP4J digest..."
>
>
>Today's Topics:
>
>   1. Why am I getting duplicates? (Mark Stang)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Fri, 22 Jun 2007 15:22:57 -0600
>From: "Mark Stang" <mstang at pingidentity.com>
>Subject: [SNMP4J] Why am I getting duplicates?
>To: <snmp4j at agentpp.org>
>Message-ID:
>	<EB178A5944D70843A3B413BEB9373E46E1BE04 at ex2.corp.pingidentity.com>
>Content-Type: text/plain;	charset="iso-8859-1"
>
>During startup I get:
>353 [main] INFO org.snmp4j.agent.DefaultMOServer  - Registered MO org.snmp4j.agent.mo.MOScalar[oid=1.3.6.1.4.1.28867.2.1,access=org.snmp4j.agent.mo.MOAccessImpl at 15dd910,value=0,volatile=true] in default context with scope org.snmp4j.agent.mo.MOScalar[oid=1.3.6.1.4.1.28867.2.1,access=org.snmp4j.agent.mo.MOAccessImpl at 15dd910,value=0,volatile=true]
>org.snmp4j.agent.DuplicateRegistrationException: org.snmp4j.agent.DefaultMOContextScope[context=null,lowerBound=1.3.6.1.4.1.28867.2,lowerIncluded=false,upperBound=1.3.6.1.4.1.28867.3,upperIncluded=false]
>	at org.snmp4j.agent.DefaultMOServer.register(DefaultMOServer.java:157)
>	at com.pingidentity.test.TrapTest.registerManagedObjects(TrapTest.java:117)
>	at org.snmp4j.agent.BaseAgent.registerSnmpMIBs(BaseAgent.java:205)
>	at org.snmp4j.agent.BaseAgent.init(BaseAgent.java:173)
>	at com.pingidentity.test.TrapTest.<init>(TrapTest.java:81)
>	at com.pingidentity.test.TrapTest.main(TrapTest.java:238)
>
>This occurs when I add an additional registration:
>    protected void registerManagedObjects()
>    {
>        try
>        {
>            server.register(wrapVariable(1, userAuthSuccesses), null);
>            server.register(wrapVariable(2, userAuthFailures), null);
>        }
>        catch (DuplicateRegistrationException ex)
>        {
>            ex.printStackTrace();
>        }
>    }
>
>    private MOScalar wrapVariable(int index, AbstractVariable v)
>    {
>        OID oid = new OID(String.format("1.3.6.1.4.1.%d.2.%d", PINGIDENTITY_EID, index));
>        return new MOScalar(oid, MOAccessImpl.ACCESS_READ_ONLY, v);
>    }
>
>Why is the second one a "duplicate"?
>
>thanks,
>
>Mark
>
>Mark J. Stang
>Software Engineer
>office: +1 303.468.2900
>Ping Identity
>
>
>
>------------------------------
>
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/snmp4j
>
>
>End of SNMP4J Digest, Vol 41, Issue 15
>**************************************
>


More information about the SNMP4J mailing list