What do I do when my task becomes stuck in "Cancelling" state?


Kenny Lim -


My task in XL Deploy is stuck in "Cancelling" state.


XL Deploy


Given that you are now unable to cancel nor abort the task, you will have to use a different workaround for these. If those tasks are not important anymore, you can delete them from the XL_DEPLOY_SERVER_HOME/work directory next time you shutdown XLD server. There should be a {taskID}.task file. If the deployment has artifact CI there should also be a .tmp folder and as name will have the task-DATE_and_TIME. Refer to our documentation here for more information. Once you have removed them, when XLD is started up again, they should no longer appear in the task menu.


The most likely reason you would see a task in this state, i.e. cancelling but never cancelled nor able to be aborted, is that task information stored on disc has been corrupted. The most common reason we see for this is that XLD has been stopped abruptly while a task is running. Although, it could occur if in other circumstances.


Additional Information

In general you should never restart XLD server while there are active tasks. You should put the server in maintenance-mode and wait for all active tasks to be finished, or take manual actions to either stop or abort them gracefully. The best strategy, if you want to cancel a deployment task, is to first stop (gracefully stopping the task) or abort (forcefully stopping the task) and then rollback the deployment. Just pressing cancel on a partially completed deployment may result in application not working as expected on the target server.