jenkins pipeline running inside docker image just hangs

This was a bug in the Durable Task plugin and has been fixed by the latest release (1.33).

See JENKINS-59903


I had the same problem and after a long wait this error message is logged in console:

Cannot contact : java.io.FileNotFoundException: File '/var/lib/jenkins/workspace/myproject@2@tmp/durable-1a2d497f/output.txt' does not exist

The problem is Durable Task plugin. In my case I downgraded Durable Task plugin from latest (1.31) to 1.30 and that solved the problem.

I'm using Docker Pipeline version 1.21