Jenkins build stalls on `'docker' is waiting`

771 views Asked by At
Still waiting to schedule task
‘docker’ is offline

JenkinsFile:

pipeline {
    agent {
        node {
            label 'docker'
            customWorkspace "workspace/${JOB_NAME}/${BUILD_NUMBER}"
        }
    }
...

What is the cause of this error, and how can I diagnose it further?

I don't see any related containers running via docker ps.

2

There are 2 answers

0
Florian On

If you use node {} with a specific label, and don't have any nodes with that label set-up, the build will be stuck forever. You also need to make sure you have at least 2 executors set-up when using a single node (like 'master'), otherwise pipeline builds will usually be stuck, as they consist of a root build and several sub-builds for the steps.

0
Chris Stryczynski On

Relating to the agent named docker. They can be viewed on the "Build executor status" / "Nodes" / https://jenkins-url.local/computer/