[SNMP4J] IllegalStateException: Timer already cancelled

Frank Fock fock at agentpp.com
Tue Jun 6 21:35:27 CEST 2006


Hi Fulvio,

It seems that somehow Snmp.close() has been called while
your application is running (or a new Snmp class has been
created without calling Snmp.listen()).

Hope this helps.

Best regards,
Frank

Cavaretta Fulvio (CONS), IT wrote:
> Hi,
> We are using the SNMP4J v. 1.7 stack in our application for managing SNMP agents.
> Our application is running on a 4 CPU SUN 480 server. The java version is 1.5.0_05 run with the options " -Xms1024M -Xmx4096M -d64".
> During normal activity our application is performing the polling towards the agents, simply getting a particular leaf. This activity is performed using asynchronous requests. In the response handler, if the polling is succesfull, we also perform some other get/set.
> A few days ago we got a strange problem on the snmp stack: our application was using the 20% of the CPU (usually it uses less then 1%) and at every polling request we got the following stack trace:
> 
> 
> java.lang.IllegalStateException: Timer already cancelled.
>         at java.util.Timer.sched(Timer.java:354)
>         at java.util.Timer.schedule(Timer.java:170)
>         at org.snmp4j.Snmp.send(Snmp.java:861)
>         at org.snmp4j.Snmp.send(Snmp.java:839)
>         at com.tilab.common.device.snmp.SNMPV2Driver.asyncRead(Unknown Source)	
>         at com.tilab.common.device.snmp.SNMPV2Adapter.asyncCheckConnection(Unknown Source)
>         at com.tilab.common.device.tracker.TrackingTask.run(Unknown Source)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)
> 
> 
> The exception is thrown when the application is tring to send the asyncrhonous polling request.
> To solve the problem we had to restart our application.
> 
> 
> Thanks in advance for your help,
>   Fulvio
> 
> 
> 
> Pirelli Broadband Solutions
> 
> Contact: Fulvio Cavarretta, ONE-ANS consultant
> E-Mail: fulvio.cavaretta.oa at pirelli.com
>            fulvio.cavarretta at one-ans.it
> 
> Phone: +39 02 6442 51400 
> 
> 
> 
> 
> ========================================================
> CONFIDENTIALITY NOTICE
> 
> This message and its attachments (if any) may contain confidential,
> proprietary or legally privileged information and it is intended only for
> the use of the addressee named above. No confidentiality or privilege
> is waived or lost by any mistransmission.
> 
> If you are not the intended recipient of this message you are hereby
> notified that you must not use, disseminate, copy it in any form or take
> any action in reliance on it. If you have received this message in error,
> please, delete it (and any copies of it) and kindly inform the sender, of this
> e-mail, by replying or go to www.pirelli.com on "contact us".
> ========================================================
> _______________________________________________
> 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