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

docker pipeline finish beforehand when tcp socket is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • docker-workflow-plugin
    • None
    • I tested it on 2.72.2 lts and 2.87 , docker-workflow plugin 1.14 . Docker version 17.09.0-ce, build afdb6d4

      Hi Team 

      Hi I see two similar tickets 

      1. --JENKINS-46969--
      2. --JENKINS-34289-- 

      as resolved but I have this issue on latest jenkins.

      see output below. bash script has to output from 1 to 10 but actually it is terminated after 5

      Started by user 
       [admin|http://localhost:5555/user/admin]
       [Pipeline] node
       Running on 
       [mycloud-9504e9618fd4|http://localhost:5555/computer/mycloud-9504e9618fd4/]
       in /home/jenkins/workspace/ping in docker pipeline
       [Pipeline] \{
       [Pipeline] withDockerServer
       [Pipeline] \{
       [Pipeline] sh
       [ping in docker pipeline] Running shell script
       + docker inspect -f . debian:jessie
       .
       [Pipeline] withDockerContainer
       mycloud-9504e9618fd4 seems to be running inside container 9504e9618fd45c29aa367f9f18a9abda56bb19581fdfdc84ba109921c575742b
       $ docker run -t -d -u 1000:1000 --cpu-quota=400000 -w "/home/jenkins/workspace/ping in docker pipeline" --volumes-from 9504e9618fd45c29aa367f9f18a9abda56bb19581fdfdc84ba109921c575742b -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** --entrypoint cat debian:jessie
       [Pipeline] \{
       [Pipeline] stage
       [Pipeline] \{ (test)
       [Pipeline] timeout
       Timeout set to expire in 1 min 40 sec
       [Pipeline] \{
       [Pipeline] echo
       start
       [Pipeline] sh
       [ping in docker pipeline] Running shell script
       + bash -c for i in \{1..10}; do echo $\{i}; sleep 0.05; done
       1
       2
       3
       4
       5
       [Pipeline] }
       [Pipeline] // timeout
       [Pipeline] }
       [Pipeline] // stage
       [Pipeline] }
       $ docker stop --time=1 dd1eb9145a9894e5b9f6435ebdf624414cb1ba0abd115ddd126f85335fce937f
       $ docker rm -f dd1eb9145a9894e5b9f6435ebdf624414cb1ba0abd115ddd126f85335fce937f
       [Pipeline] // withDockerContainer
       [Pipeline] }
       [Pipeline] // withDockerServer
       [Pipeline] }
       [Pipeline] // node
       [Pipeline] End of Pipeline
       ERROR: script returned exit code -1
       Finished: FAILURE
      

      I'm not able to run any step longer then one second  or so.

       

      my pipeline script is 

       node {
          docker.withServer('tcp://172.17.0.1:2375') {
            
              docker.image('debian:jessie').inside('--cpu-quota=400000') {
                  stage('test') {
                  
                     timeout(time: 100, unit: 'SECONDS') {
                     echo 'start'
                      sh  '''
                      bash -c 'for i in {1..10}; do echo ${i}; sleep 0.05; done'
                      '''
                      echo 'stop'
                     }
                
                  }
              }
          } 
      

            Unassigned Unassigned
            iceiceice Alexey Grigorov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: