Skip to content

Troubleshooting Shiva task submitting

Is my task is actually running ?

First things first, let's run the following command:

alice@laptop:~$  shiva://common/tasks | jq

The output is a pretty json, where you should easily locate your task. If you locate it, your task is currently submitted. To know which worker is in charge of executing it, type in :

alice@laptop:~$  shiva://common/assignements | jq

How to get my task logs ?

Your task can logs events in two ways:

  1. Simply log message to stdout/stderr.
  2. Log to a specified file using its own logic, for example using its own log4j configuration file.

Case 1: Running in foreground

Check out the [shiva-log-*] index using your admin Kibana. You will see there your task logs.

Case 2: Writting to a file

You must understand the task logic, to know where its local log files are located.

How to debug a submitted task ?

When a task is submitted, shiva loads the task command and arguments to a local folder. That folder is defined as one of the shiva startup argument. By default is use the local operating system temporary folder. There you will find a tree folder structure obeying the tenant/channel hierarchy. For example assuming you submitted the hello world task as explained in the Shiva guide :

└── punchplatform
  └── mytenant
      ├── channels
          └── hello_world_shiva
              └── my_hello_world_task
                  ├── CONTENT-1

To debug your command script, you can call it from this directory to see what happens. To do so, we have to now the absolute path of additionalArg to pass it as argument. Let\'s do it with

alice@laptop:~$ realpath CONTENT-1

Then, we can now call the command script using

alice@laptop:~$  bash -x /.../shiva/punchplatform/mytenant/channels/hello_world_shiva/my_hello_world_task/CONTENT-1

The -x flag (optinal) is used to run the bash script in debug mode