Dealing with DeployIt Timer problem
I hate it when it occurs but got to face this every few days when the number of deployments are high. We run our deployments through a DeployIt plugin off Jenkins and sometimes get the following error in the logs.
[ERROR]: Task failed. [ERROR]: nl.javadude.t2bus.BusException: java.lang.IllegalStateException: Timer already cancelled. [ERROR]: at nl.javadude.t2bus.event.strategy.ThrowingEventHandlerStrategy.handleInvocationTargetException(ThrowingEventHandlerStrategy.java:11) [ERROR]: at nl.javadude.t2bus.event.strategy.BaseEventHandlerStrategy.handle(BaseEventHandlerStrategy.java:19) [ERROR]: at nl.javadude.t2bus.T2Bus.handle(T2Bus.java:373) [ERROR]: at nl.javadude.t2bus.T2Bus.dispatch(T2Bus.java:359) [ERROR]: at nl.javadude.t2bus.T2Bus.dispatchQueuedEvents(T2Bus.java:341) [ERROR]: at nl.javadude.t2bus.T2Bus.post(T2Bus.java:275) [ERROR]: at nl.javadude.t2bus.T2Bus.post(T2Bus.java:298) [ERROR]: at com.xebialabs.deployit.engine.tasker.EventBusAdapter.post(EventBusAdapter.java:22) [ERROR]: at com.xebialabs.deployit.engine.tasker.TaskExecutionContext.publish(TaskExecutionContext.java:71) [ERROR]: at com.xebialabs.deployit.engine.tasker.TaskRunner.setTaskState(TaskRunner.java:255) [ERROR]: at com.xebialabs.deployit.engine.tasker.TaskRunner.setTaskState(TaskRunner.java:259) [ERROR]: at com.xebialabs.deployit.engine.tasker.TaskRunner.run(TaskRunner.java:72) [ERROR]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [ERROR]: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [ERROR]: at java.util.concurrent.FutureTask.run(FutureTask.java:166) [ERROR]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [ERROR]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [ERROR]: at java.lang.Thread.run(Thread.java:722) [ERROR]: Caused by: java.lang.IllegalStateException: Timer already cancelled. [ERROR]: at java.util.Timer.sched(Timer.java:397) [ERROR]: at java.util.Timer.schedule(Timer.java:193) [ERROR]: at com.xebialabs.deployit.engine.tasker.TaskRecoveryTrigger.startWritingTimer(TaskRecoveryTrigger.java:65) [ERROR]: at com.xebialabs.deployit.engine.tasker.TaskRecoveryTrigger.taskStateChanged(TaskRecoveryTrigger.java:53) [ERROR]: at com.xebialabs.deployit.engine.tasker.EventBusAdapter$EventListenerAdapter.taskStateChanged(EventBusAdapter.java:67) [ERROR]: at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source) [ERROR]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR]: at java.lang.reflect.Method.invoke(Method.java:601) [ERROR]: at nl.javadude.t2bus.EventHandler.handleEvent(EventHandler.java:88) [ERROR]: at nl.javadude.t2bus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:48) [ERROR]: at nl.javadude.t2bus.event.strategy.BaseEventHandlerStrategy.handle(BaseEventHandlerStrategy.java:15) [ERROR]: ... 16 more
The only way so far I have seen to fix this for the time being is to shutdown DeployIt and restart the service. Do take a note to kill the DeployIt service if it doesn't quit gracefully.
Now while you are at it, you might want to back up and clean out the temporary work folders. Made my day. I would post once I get a proper solution from XebiaLabs.
[Update]: The issue has been fixed in DeployIt 3.9.3 with a hotfix (DEPLOYITPB-4904).
[Update]: The issue has been fixed in DeployIt 3.9.3 with a hotfix (DEPLOYITPB-4904).
Comments