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

docker pipeline finish beforehand when tcp socket is used

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 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

    Description

      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'
                     }
                
                  }
              }
          } 
      

      Attachments

        Issue Links

          Activity

            iceiceice Alexey Grigorov created issue -
            iceiceice Alexey Grigorov made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-34289 [ JENKINS-34289 ]
            iceiceice Alexey Grigorov added a comment - - edited

            there are similar issues marked as related but no solution there

            iceiceice Alexey Grigorov added a comment - - edited there are similar issues marked as related but no solution there
            iceiceice Alexey Grigorov made changes -
            Link This issue is related to JENKINS-46969 [ JENKINS-46969 ]
            iceiceice Alexey Grigorov made changes -
            Description Hi Team 

            Hi I see two similar tickets 
             # --JENKINS-46969--
             # --JENKINS-34289-- 

            as resolved by 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://10.69.11.211:2375') {
                  
                    docker.image('debian:jessie').inside('--cpu-quota=400000') {
                        stage('test') {
                        
                           timeout(time: 100, unit: 'SECONDS') {
                           echo 'start'
                            sh 'for i in {1..50}; do sleep 2; echo "Still Running";done'
                            echo 'stop'
                           }
                      
                        }
                    }
                }
            }
             }}
            Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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://10.69.11.211:2375') \{

            docker.image('debian:jessie').inside('--cpu-quota=400000') \{
             stage('test') \{

            timeout(time: 100, unit: 'SECONDS') \{
             echo 'start'
             sh 'for i in

            \{1..50}

            ; do sleep 2; echo "Still Running";done'
             echo 'stop'
             }

            }
             }
             }
             }
            iceiceice Alexey Grigorov made changes -
            Description Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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://10.69.11.211:2375') \{

            docker.image('debian:jessie').inside('--cpu-quota=400000') \{
             stage('test') \{

            timeout(time: 100, unit: 'SECONDS') \{
             echo 'start'
             sh 'for i in

            \{1..50}

            ; do sleep 2; echo "Still Running";done'
             echo 'stop'
             }

            }
             }
             }
             }
            Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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'
                           }
                      
                        }
                    }
                }
            iceiceice Alexey Grigorov made changes -
            Description Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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'
                           }
                      
                        }
                    }
                }
            Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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'
                           }
                      
                        }
                    }
                }}}
            iceiceice Alexey Grigorov made changes -
            Description Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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'
                           }
                      
                        }
                    }
                }}}
            Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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'
                           }
                      
                        }
                    }
                }
            }}
            iceiceice Alexey Grigorov made changes -
            Description Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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'
                           }
                      
                        }
                    }
                }
            }}
            Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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 


            {code:java}
             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'
                           }
                      
                        }
                    }
                }
            {code}
            iceiceice Alexey Grigorov made changes -
            Description Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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 


            {code:java}
             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'
                           }
                      
                        }
                    }
                }
            {code}
            Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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


            {noformat}
            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
            {noformat}


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

             

            my pipeline script is 


            {code:java}
             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'
                           }
                      
                        }
                    }
                }
            {code}
            iceiceice Alexey Grigorov made changes -
            Description Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---JENKINS-34289--- 

            as resolved by 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


            {noformat}
            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
            {noformat}


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

             

            my pipeline script is 


            {code:java}
             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'
                           }
                      
                        }
                    }
                }
            {code}
            Hi Team 

            Hi I see two similar tickets 
             # ---JENKINS-46969---
             # ---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


            {noformat}
            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
            {noformat}


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

             

            my pipeline script is 


            {code:java}
             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'
                           }
                      
                        }
                    }
                }
            {code}
            iceiceice Alexey Grigorov added a comment - - edited

            I did few tests and found problem is applicable only when using network socket. for unix socket it is ok

            iceiceice Alexey Grigorov added a comment - - edited I did few tests and found problem is applicable only when using network socket. for unix socket it is ok
            iceiceice Alexey Grigorov made changes -
            Summary docker pipeline finish beforehand docker pipeline finish beforehand when tcp socket is used

            I'm closing this issue because it is fixed in https://issues.jenkins-ci.org/browse/JENKINS-47791

            iceiceice Alexey Grigorov added a comment - I'm closing this issue because it is fixed in https://issues.jenkins-ci.org/browse/JENKINS-47791
            iceiceice Alexey Grigorov made changes -
            Link This issue depends on JENKINS-47791 [ JENKINS-47791 ]
            iceiceice Alexey Grigorov made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Closed [ 6 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: