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

docker pipeline finish beforehand when tcp socket is used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Duplicate
    • Component/s: docker-workflow-plugin
    • Labels:
      None
    • Environment:
      I tested it on 2.72.2 lts and 2.87 , docker-workflow plugin 1.14 . Docker version 17.09.0-ce, build afdb6d4
    • Similar Issues:

      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

            Hide
            iceiceice Alexey Grigorov added a comment - - edited

            there are similar issues marked as related but no solution there

            Show
            iceiceice Alexey Grigorov added a comment - - edited there are similar issues marked as related but no solution there
            Hide
            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

            Show
            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
            Hide
            iceiceice Alexey Grigorov added a comment -

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

            Show
            iceiceice Alexey Grigorov added a comment - I'm closing this issue because it is fixed in https://issues.jenkins-ci.org/browse/JENKINS-47791

              People

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

                Dates

                Created:
                Updated:
                Resolved: