[SNMP4J] Strange problem with SnmpV3 traps.

Frank Fock fock at agentpp.com
Thu Nov 1 20:54:20 CET 2007


OK, then the "agent" is probably not incrementing its bootcounter.

Best regards,
Frank

Xinxin Song schrieb:
> Hi Frank,
>
> I am pretty sure the problem is not caused by the OS doesn't allow 
> resuing a port shortly after it is closed. Because when I keep the 
> SnmpV3Receiver running, and restart the SnmpAgentCaller one hour after 
> the problem occurs, I still don't get anything on the Receiver side. 
> But if I terminate the SnmpV3Receiver then re-start it, and restart 
> the SnmpAgentCaller, it works fine for the first 4-5 rounds.
>
> Thanks for help.
> 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