Skip to content

Dynamic Set Jenkins Plugin Start Parameters

Context

Recently, one of our Jenkins job which running inside docker got exception regarding to the durable task plugin.

Bash
20:07:29  process apparently never started in /path/workspace/durable-181c4c30
20:07:29  (running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
20:07:29  Cannot contact Nodexxx: java.io.FileNotFoundException: /path/workspace/durable-181c4c30/output.txt (No such file or directory)

After print this message to the console, the job got stucked.

Problems

As the log sugessted, that it's requried to add the parameter -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true to Jenkins start parameters to get more details of the error, but our Jenkins isn't managed by us, so we can't add the parameter and restart it.

Solution

After searched from google, an user from stackoverflow said we could executed org.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true in Jenkins script console to get the same effect.

After executed org.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true in the Jenkins script console, we got more details when the issue happened again.

you need administrator privillege to execute it