Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65409

If docker container fails to start, Jenkins should run "docker logs"


      Please attempt to run "docker logs" if a container fails to start using "docker.image().inside {}" or "withDockerContainer"


      Currently, if a docker container fails to run in a Pipeline build (i.e., "docker top" is not able to locate the running container), the following message is displayed:
      process apparently never started in /home/jenkins/workspace/my/workspace@tmp/durable-9e096821
      (running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
      After this, Jenkins runs "docker stop" and "docker rm" to get rid of the container.

      Instead, when "docker top" fails, Jenkins should attempt to run "docker logs" on the container before removing it. The original failure should be rethrown regardless of whether docker logs fails.


      It's not clear by default what the source of the problem might be, and it's very difficult for a user without Jenkins admin access to find a workaround.


            Unassigned Unassigned
            rmorrise Russell Morrisey
            0 Vote for this issue
            1 Start watching this issue