Jenkins pipelines stuck - Waiting for next available executor

11/18/2019

I have a pipeline script with agent any which doesn't work anymore.

It is stuck @ Waiting for next available executor

pipeline {
    agent any
    stages {
        stage('Stage1') {
            steps {
                sh 'java -version'
            }
        }
        stage('Stage2'){
         steps {
            container('docker') {
                sh 'docker version'
            }
          }
        }
    }
}

If I update it to use agent kubernetes then it starts working again.

pipeline {
    agent {
        kubernetes {
            label "team-abc-jenkins-slave-${UUID.randomUUID().toString()}"
            defaultContainer 'jnlp'
        }
    }
    stages {
        stage('Stage1') {
            steps {
                sh 'java -version'
            }
        }
        stage('Stage2') {
         steps {
            container('docker') {
                sh 'docker version'
            }
          }
        }
    }
}

It was working fine few days back and then stopped working. I am on Jenkins ver. 2.190.2

enter image description here enter image description here

As you can see that a node/slave is started but its suspended

enter image description here

-- Nikhil Gupta
jenkins
jenkins-pipeline
kubernetes-jenkins-plugin

1 Answer

11/18/2019

Issue was with the Host Path Volume, it was missing the initial / in /var/run/docker.sock

-- Nikhil Gupta
Source: StackOverflow