[SNMP4J] Timer already cancelled exception

Marco Matchefts mmatchefts at cesura.com
Tue Jan 31 21:12:56 CET 2006


Additional information on the following exception.  It appears that the
agent that I was communicating with

was not responding, so the request was timing out.  I was able to
reproduce the problem with other agents 

where the response times out as well.  Do we still handle these
responses the same in the ::onResponse

callback by calling the ::cancel fcn on the response?  Has anyone else
seen this exception when

getting timeouts in the response?  The interface did work as designed
when communicating with agents

that responded properly.  thanks again.

 

________________________________

From: Marco Matchefts 
Sent: Tuesday, January 31, 2006 11:39 AM
To: 'snmp4j at agentpp.org'
Subject: Timer already cancelled exception

 

I am using the async interface to send an SNMP Get request to an agent.
The request is

over UDP and using Version 2c.  The application invoking the async
interface is multithreaded.

I am getting an IllegalStateException in the stack saying the "Timer
already cancelled".

 

The stack trace is enclosed.  Any ideas?  Has anyone seen this before?
thanks in advance.

 

java.lang.IllegalStateException: Timer already cancelled.

        at java.util.Timer.sched(Unknown Source)

        at java.util.Timer.schedule(Unknown Source)

        at org.snmp4j.Snmp.send(Snmp.java:854)

        at org.snmp4j.Snmp.send(Snmp.java:832)

        at
com.vieo.management.snmp.SNMP4jSessionFactory$SessionAdapter.send(SNMP4j
SessionFactory.java:356)

        at
com.vieo.management.snmp.DataCollectorTask.sendRequests(DataCollectorTas
k.java:173)

        at
com.vieo.management.snmp.DataCollectorTask.collectReadings(DataCollector
Task.java:123)

        at
com.vieo.management.snmp.DataCollectorTask.run(DataCollectorTask.java:29
9)

        at
com.vieo.util.TaskScheduler$TaskQueue$ScheduledTask.run(TaskScheduler.ja
va:1056)

        at com.vieo.util.ThreadPool$TaskRunner.run(ThreadPool.java:212)

        at java.lang.Thread.run(Unknown Source)




More information about the SNMP4J mailing list