[SNMP4J] Re: Traps - Multiple Management (BRESCIAN I MARCO)
通子
ytsun04 at 163.com
Thu Nov 1 10:06:35 CET 2007
Because of the trap receiver port already been used by the first manager.
use another port for the second manager.
> Today's Topics:
>
> 1. Traps - Multiple Management (BRESCIANI MARCO)
> 2. Re: Extending Agent (dhay at lexmark.com)
> 3. Re: Extending Agent (Frank Fock)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 30 Oct 2007 15:28:11 +0100
> From: "BRESCIANI MARCO" <Marco.Bresciani at alcatel-lucent.it>
> Subject: [SNMP4J] Traps - Multiple Management
> To: <snmp4j at agentpp.org>
> Message-ID:
> <BDFFB4D77E27FB41838B5E46C150DEB2FBCD8E at FRVELSMBS21.ad2.ad.alcatel.com>
>
> Content-Type: text/plain; charset="UTF-8"
>
> Hello,
> I'm working on a software using SNMP4J API and I'm facing a strange problem related to trap receving.
> I have to start multiple instances of my software and it seems I'm having conflicts (or things like that) on SNMP ports for receiving traps.
>
> These are the steps:
>
> - run first application (double click on a JAr), it registers on SNMP agent and works correctly (send/receive data and receive traps);
>
> - run second application (another JVM, another double click on a JAr). It registers on (another, different IP address) SNMP agent and can send and received data but cannot receive traps because they goes to first application only. I cannot read those trap data from the second application, even though sending/receiving "normal" SNMP data is correct.
>
>
> No errors are shown by SNMP4J on second application but no data are received.
>
>
> This is my trap listener registration:
> //trap listener registration
> boolean re = snmpManager.getManager()
> .addNotificationListener(trapAddress, trapController);
>
>
> This is the setting-up of Snmp class:
> public SnmpManager(String pAddress, int pPort, boolean pSelectV3,
> int pRetries, int pTimeout) {
> this.setTransport();
>
> /* SNMP activation */
> this.snmpObject = new Snmp(transport);
>
> /* SNMP v2c/v3 message processor */
> if (pSelectV3) {
> this.snmpObject.getMessageProcessingModel(
> MessageProcessingModel.MPv3);
> this.usm = new USM(SecurityProtocols.getInstance(),
> new OctetString(MPv3.createLocalEngineID()), 0);
> SecurityModels.getInstance().addSecurityModel(this.usm);
> } else {
> this.snmpObject.getMessageProcessingModel(
> MessageProcessingModel.MPv2c);
> }
>
> this.startSNMP();
> this.setDevice(pSelectV3, pRetries, pTimeout);
> this.setTarget(pAddress.toString(), pPort);
> }
>
>
>
> Any help or idea on this? Obviously, agent address is different on the two applications but it seems second application cannot receive trap.
> Please, help.
>
>
> Because the world is always on.,
>
> Ing. Marco Bresciani
> Alcatel-Lucent
> Software Specialist
> OpticsBD R&D Software Competence Center
> via Trento 30, Vimercate, Italy, 20059
> EMail: Marco.Bresciani at alcatel-lucent.it
> Phone: +39 039 686 5546
> Fax: +39 039 686 5600
>
> ------------------------------
More information about the SNMP4J
mailing list