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

Jenkins docker image does not gracefully shutdown

      When running the official Jenkins docker image I expect Jenkins to respond to a SIGTERM event from Docker (docker stop) by gracefully shutting down the server.

      E.g.

      If I do this...

      docker run jenkins/jenkins
      # Wait for the container to start
      Ctrl^C

      I would expect Jenkins to shutdown gracefully just like if I'd called <jenkins-url>/stop.  Instead, the container just exits.

      The exact same thing happens if you try using docker stop command.

      This is causing problems for me running Jenkins in AWS ECS.  When I have a new Jenkins container I want to deploy, ECS will issue a stop command to the running container before starting the new container.  The running Jenkins container will not stop gracefully and when the new container starts I have a lock problem because of the previous dirty exit.

      I am marking this as major as this behaviour is deviating from what is documented here. where it says:

      Sending a SIGTERM/SIGINT to Jenkins will trigger a graceful shutdown.

       

       

       

          [JENKINS-64699] Jenkins docker image does not gracefully shutdown

          Rob White created issue -
          Rob White made changes -
          Description Original: When running the official Jenkins docker image I expect Jenkins to respond to a SIGTERM event from Docker (docker stop) by gracefully shutting down the server.

          E.g.

          If I do this...
          {code:java}
          docker run jenkins/jenkins
          # Wait for the container to start
          Ctrl^C{code}
          I would expect Jenkins to shutdown gracefully just like if I'd called <jenkins-url>/stop.  Instead, the container just exits.

          The exact same thing happens if you try using docker stop command.

          This is causing problems for me running Jenkins in AWS ECS.  When I have a new Jenkins container I want to deploy, ECS will issue a stop command to the running container before starting the new container.  The running Jenkins container will not stop gracefully and when the new container starts I have a lock problem because of the previous dirty exit.

          I am marking this as major as this behaviour is deviating from what is documented [here|https://www.jenkins.io/doc/book/pipeline/scaling-pipeline/#:~:text=A%20%22graceful%22%20shutdown%20is%20where,will%20trigger%20a%20graceful%20shutdown.&#xA0;where it says:
          {quote}Sending a SIGTERM/SIGINT to Jenkins will trigger a graceful shutdown.
          {quote}
           

           

           
          New: When running the official Jenkins docker image I expect Jenkins to respond to a SIGTERM event from Docker (docker stop) by gracefully shutting down the server.

          E.g.

          If I do this...
          {code:java}
          docker run jenkins/jenkins
          # Wait for the container to start
          Ctrl^C{code}
          I would expect Jenkins to shutdown gracefully just like if I'd called <jenkins-url>/stop.  Instead, the container just exits.

          The exact same thing happens if you try using docker stop command.

          This is causing problems for me running Jenkins in AWS ECS.  When I have a new Jenkins container I want to deploy, ECS will issue a stop command to the running container before starting the new container.  The running Jenkins container will not stop gracefully and when the new container starts I have a lock problem because of the previous dirty exit.

          I am marking this as major as this behaviour is deviating from what is documented [here|https://www.jenkins.io/doc/book/pipeline/scaling-pipeline/#:~:text=A%20%22graceful%22%20shutdown%20is%20where,will%20trigger%20a%20graceful%20shutdown]. where it says:
          {quote}Sending a SIGTERM/SIGINT to Jenkins will trigger a graceful shutdown.
          {quote}
           

           

           
          Oleg Nenashev made changes -
          Issue Type Original: Bug [ 1 ] New: New Feature [ 2 ]
          Oleg Nenashev made changes -
          Assignee Original: Carlos Sanchez [ csanchez ]

            Unassigned Unassigned
            wimnat Rob White
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: