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

Calling container image with wrong arguments reports process apparently never started

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • durable-task-plugin
    • None
    • Jenkins Version: 2.437
      Durable Task Plugin Version: 523.va_a_22cf15d5e0
      Docker Engine: 24.0.7
      macOS: 14.2.1

       

      Pipeline Script:

      pipeline {
          agent {
              node {
                  label 'kazaff-macbookpro'
              }
          }    stages {
              stage('before docker pull') {
                  steps {
                      sh 'docker images'
                  }
              }
              stage('maven docker') {
                  agent {
                      docker {
                          image 'maven:3.9.6-amazoncorretto-17-al2023'
                          reuseNode true
                      }
                  }
                  steps {
                      echo "hi"
                      sh 'pwd'
                  }
              }
              stage('after docker pull') {
                  steps {
                      sh 'docker images'
                  }
              }
          }
      }
       

       

       

      Console Output:

      Started by user kazaff
      [Pipeline] Start of Pipeline
      [Pipeline] node
      Running on kazaff-macbookpro-docker in /home/jenkins/agent/workspace/agent-node-test
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (before docker pull)
      [Pipeline] sh
      + docker images
      REPOSITORY   TAG       IMAGE ID   CREATED   SIZE
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (maven docker)
      [Pipeline] getContext
      [Pipeline] isUnix
      [Pipeline] withEnv
      [Pipeline] {
      [Pipeline] sh
      + docker inspect -f . maven:3.9.6-amazoncorretto-17-al2023
      
      Error: No such object: maven:3.9.6-amazoncorretto-17-al2023
      [Pipeline] isUnix
      [Pipeline] withEnv
      [Pipeline] {
      [Pipeline] sh
      + docker pull maven:3.9.6-amazoncorretto-17-al2023
      3.9.6-amazoncorretto-17-al2023: Pulling from library/maven
      62dac1e13f9a: Pulling fs layer
      f5d246986fbe: Pulling fs layer
      8e9e16138e91: Pulling fs layer
      8e4abf01a39c: Pulling fs layer
      e368785742f8: Pulling fs layer
      2140f244c8d2: Pulling fs layer
      dbf2d756ee54: Pulling fs layer
      e368785742f8: Waiting
      2140f244c8d2: Waiting
      dbf2d756ee54: Waiting
      8e4abf01a39c: Waiting
      8e9e16138e91: Verifying Checksum
      8e9e16138e91: Download complete
      62dac1e13f9a: Verifying Checksum
      62dac1e13f9a: Download complete
      e368785742f8: Download complete
      62dac1e13f9a: Pull complete
      8e4abf01a39c: Verifying Checksum
      8e4abf01a39c: Download complete
      2140f244c8d2: Verifying Checksum
      2140f244c8d2: Download complete
      dbf2d756ee54: Verifying Checksum
      dbf2d756ee54: Download complete
      f5d246986fbe: Verifying Checksum
      f5d246986fbe: Download complete
      f5d246986fbe: Pull complete
      8e9e16138e91: Pull complete
      8e4abf01a39c: Pull complete
      e368785742f8: Pull complete
      2140f244c8d2: Pull complete
      dbf2d756ee54: Pull complete
      Digest: sha256:37465f4fa8b3f4e5b4f26f835c99492f7bfd33dc8f0c1c30f886a2620f4b3038
      Status: Downloaded newer image for maven:3.9.6-amazoncorretto-17-al2023
      docker.io/library/maven:3.9.6-amazoncorretto-17-al2023
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] withDockerContainer
      kazaff-macbookpro-docker seems to be running inside container 3acc2b9918d61dbb689de75211deee5343b01d531b75969749b7330bd3628aae
      but /home/jenkins/agent/workspace/agent-node-test could not be found among []
      but /home/jenkins/agent/workspace/agent-node-test@tmp could not be found among []
      $ docker run -t -d -u 1000:1000 -w /home/jenkins/agent/workspace/agent-node-test -v /home/jenkins/agent/workspace/agent-node-test:/home/jenkins/agent/workspace/agent-node-test:rw,z -v /home/jenkins/agent/workspace/agent-node-test@tmp:/home/jenkins/agent/workspace/agent-node-test@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** maven:3.9.6-amazoncorretto-17-al2023 cat
      $ docker top f7f481a082645d4594a913615022fd395e440f64424ffb96c6b024faa8706f8f -eo pid,comm
      [Pipeline] {
      [Pipeline] echo
      hi
      [Pipeline] sh
      process apparently never started in /home/jenkins/agent/workspace/agent-node-test@tmp/durable-410dcba0
      (running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
      [Pipeline] }
      $ docker stop --time=1 f7f481a082645d4594a913615022fd395e440f64424ffb96c6b024faa8706f8f
      $ docker rm -f --volumes f7f481a082645d4594a913615022fd395e440f64424ffb96c6b024faa8706f8f
      [Pipeline] // withDockerContainer
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (after docker pull)
      Stage "after docker pull" skipped due to earlier failure(s)
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code -2
      Finished: FAILURE 

       

        1. image-2023-12-27-15-52-54-644.png
          image-2023-12-27-15-52-54-644.png
          41 kB
        2. pipeline-job.txt
          0.6 kB
        3. plugins.txt
          2 kB
        4. run-jenkins.sh
          0.8 kB

            Unassigned Unassigned
            kazaff kazaf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: