Issue: cli command with tasks=task2.getAllCurrentTasks() crashes with Deploy


When you try to run Deploy-CLI and execute the command tasks=task2.getAllCurrentTasks()  as follows you end up with the below error.

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
Username: admin
Welcome to the XL Deploy Jython CLI!
Type 'help' to learn about the objects you can use to interact with XL Deploy.

XL Deploy Objects available on the CLI:

* deployit: The main gateway to interfacing with XL Deploy.
* deployment: Perform tasks related to setting up deployments
* factory: Helper that can construct Configuration Items (CI) and Artifacts
* placeholder: Access to the resolved placeholders from the dictionaries.
* repository: Gateway to doing CRUD operations on all types of CIs
* security: Access to the security settings of XL Deploy.
* session: Access to the active sessions and it's overview.
* stitch: Access to stitch dry-run service.
* task2: Access to the task block engine of XL Deploy.
* tasks: Access to the task engine of XL Deploy. !Deprecated! Use task2 instead.
* workers: Access to the task execution workers of XL Deploy

To know more about a specific object, type <objectname>.help()
To get to know more about a specific method of an object, type <objectname>.help("<methodname>")

Reading extension: D:\xl-deploy-cli\ext\
Reading extension: D:\xl-deploy-cli\ext\
Reading extension: D:\xl-deploy-cli\ext\readme.cli
admin > tasks=task2.getAllCurrentTasks()
java.lang.RuntimeException: com.esotericsoftware.kryo.KryoException [/tasks/v2/current/all]: java.
lang.IndexOutOfBoundsException: Index -2 out of bounds for length 24
Serialization trace:
$externalProperties (com.xebialabs.deployit.plugin.overthere.Host)
host (com.xebialabs.deployit.plugin.overthere.step.CheckFileTransferStep)
implementation (com.xebialabs.deployit.engine.tasker.TaskStep)
steps (com.xebialabs.deployit.engine.tasker.StepBlock)
block (com.xebialabs.deployit.engine.tasker.Phase)
phases (com.xebialabs.deployit.engine.tasker.PhaseContainer)
block (com.xebialabs.deployit.engine.tasker.TaskSpecification)
Index -2 out of bounds for length 24
admin > exit


This can happen when the tasks in the Monitoring screen could not be found in the archive.
And when you navigate to Monitoring > deployment tasks in the Deploy GUI, you can see tasks in the state below. 2022-03-17_23_37_13-XL_Deploy.png

Steps to Follow

From the screenshot, We can see that the task cannot be found in the archive, which means the task might have been archived or the task file is removed from the work directory. Check if you have any scripts that clean the work directory every time?

Also, please try to locate Task ID 15778a2bxxxxxx-xxx-xxxxx-xx in any of these tables:


If the Task is nowhere to be found, the related error in the log should not be present after a restart. If the task is in the table, please do try to remove the task and restart the Deploy.


Was this article helpful?
1 out of 2 found this helpful



Please sign in to leave a comment.