You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jgunz <sl...@twcny.rr.com> on 2008/07/21 16:49:56 UTC
Exception in thread ActiveMQ Transport
I received the following exception in a client application using 5.1.0 on
both the client and broker:
Exception in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61606"
java.lang.IllegalStateException: Timer already cancelled.\
at java.util.Timer.sched(Timer.java:354)\
at java.util.Timer.scheduleAtFixedRate(Timer.java:296)\
at
org.apache.activemq.transport.InactivityMonitor.startMonitorThreads(InactivityMonitor.java:272)\
at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:196)\
at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196)
at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)\
at java.lang.Thread.run(Thread.java:619)
Is there something I can do to prevent this?
--
View this message in context: http://www.nabble.com/Exception-in-thread-ActiveMQ-Transport-tp18570264p18570264.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Exception in thread ActiveMQ Transport
Posted by jgunz <sl...@twcny.rr.com>.
Since I have had no luck in determining the cause of the exception, I am
trying to at least handle it gracefully. What I am considering is applying
the following patch to the InactivityMonitor in order to trigger a fail over
on the transport...
try
{
WRITE_CHECK_TIMER.scheduleAtFixedRate(writeCheckerTask,
initialDelayTime,writeCheckTime);
READ_CHECK_TIMER.scheduleAtFixedRate(readCheckerTask,
initialDelayTime,readCheckTime);
}
catch(Exception e)
{
LOG.error("Logging exception in
InactivityMonitor.startMonitorThreads() and trying to restart transport: ");
LOG.error(getStackTraceString(e));
ASYNC_TASKS.execute(new Runnable() {
public void run() {
onException(new IOException("A previously
uncaught exception in InactivityMonitor.startMonitorThreads() is now being
used to interrupt (and hopefully restart) the transport"));
};
});
}
Does this seem reasonable?
--
View this message in context: http://www.nabble.com/Exception-in-thread-ActiveMQ-Transport-tp18570264p18598452.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Exception in thread ActiveMQ Transport
Posted by jgunz <sl...@twcny.rr.com>.
Digging through org.apache.activemq.transport.InactivityMonitor I can't
really see why this would occur and thus don't know how to prevent it. It
looks like the WRITE_CHECK_TIMER was canceled somehow, and the
CHECKER_COUNTER != 0... but why or how this occurred I do not know.
Is there any help out there? How bout you in the front row... what do you
think?
--
View this message in context: http://www.nabble.com/Exception-in-thread-ActiveMQ-Transport-tp18570264p18596625.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.