[SNMP4J] Strange problem with SnmpV3 traps.
Xinxin Song
xsong at profilium.com
Thu Nov 1 20:04:31 CET 2007
Hi Frank,
If that is the case, then I should get an exception when I tried to bind the
same port to the Snmp session shortly after I closed the udpTransport. But I
don't get any exception when I run
SnmpAgent = SnmpAgentV3.getInstance();
after
SnmpAgent.close();
regards,
Xinxin
----- Original Message -----
From: "Frank Fock" <fock at agentpp.com>
To: "Xinxin Song" <xsong at profilium.com>
Cc: <snmp4j at agentpp.org>
Sent: Thursday, November 01, 2007 2:38 PM
Subject: Re: [SNMP4J] Strange problem with SnmpV3 traps.
> Hi Xinin,
>
> What you are observing is normal. On some OS, reusing
> a port shortly after another application has closed it,
> is not possible. Instead of using a defined port, use
> port "0" to get an arbitrary free port.
>
> Best regards,
> Frank
>
> Xinxin Song schrieb:
>> Hi Frank,
>>
>> I wrote a class SnmpAgentV3.java (singletion), actually it is not really
>> a Snmp agent cause its main function is to send V3 traps. And I wrote a
>> class SnmpV3Receiver.java to receive and printout the V3 traps (Please
>> see the attched files). Then I wrote a SnmpAgentCaller.java to call the
>> SnmpAgentV3 to send out V3 traps in different ways.
>>
>> The strange problem is: If I get a instance of SnmpAgentV3.java then use
>> it to send a few traps then close it and re-get the same instance and
>> then send another few V3 traps, I can repeat this close and re-opening
>> thing for a few times, and the SnmpV3Receiver shows all the traps. But
>> after 4-6 rounds (in a few minutes), the SnmpV3Receiver stops showing
>> anything altough the SnmpAgentCaller is still keeping sending traps. If
>> I don't close the instance and use the same instance to send V3 traps, I
>> can do it without problem for one hour.
>>
>> Have I done anything incorrectly there?
>>
>> Thanks,
>> Xinxin
More information about the SNMP4J
mailing list