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

Jenkins cannot restart Windows service

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When running as a Windows service, Jenkins is unable to restart itself after installing/upgrading plugins or running /restart. The tail of jenkins.err.log reads:

      """
      WARNING: Failed to restart Hudson
      java.io.IOException: Restarting a service
      [Jenkins] $ "C:\Program Files (x86)\Jenkins\jenkins.exe" restart

      at hudson.lifecycle.WindowsServiceLifecycle.restart(WindowsServiceLifecycle.java:135)
      at jenkins.model.Jenkins$23.run(Jenkins.java:3288)
      """

      Additionally, jenkins.wrapper.log shows the following error:

      """
      2014-04-16 16:54:57 - Starting C:\Program Files (x86)\Jenkins\jre\bin\java -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "C:\Program Files (x86)\Jenkins\jenkins.war" --httpPort=8080
      2014-04-16 16:54:57 - Started 1796
      2014-04-17 18:14:19 - Stopping jenkins
      2014-04-17 18:14:19 - ProcessKill 1796
      2014-04-17 18:14:19 - Send SIGINT 1796
      2014-04-17 18:14:19 - SIGINT to1796 successful
      2014-04-17 18:14:19 - Send SIGINT 1796
      2014-04-17 18:14:19 - SIGINT to 1796 failed - Killing as fallback
      2014-04-17 18:14:19 - Finished jenkins
      """

      On previous versions of Jenkins, none of the lines with "SIGINT" are present, and restart works as expected.

      Seeing this issue on two different Windows machines. Can be tested with a stock installation of jenkins-1.559.msi. After Jenkins is installed, go to localhost:8080/restart and restart. The Jenkins service will stop but not restart, and the above error can be seen in the err log.

      Went back and tested 1.549, 1.554, 1.557 and 1.558. None of these exhibited this problem. Reinstalled 1.559, and saw the problem immediately.

      Work-around is to run Windows Services manager and manually restart Jenkins service.

        Attachments

          Issue Links

            Activity

            sdcgm JCK created issue -
            sdcgm JCK made changes -
            Field Original Value New Value
            Priority Minor [ 4 ] Major [ 3 ]
            sdcgm JCK made changes -
            Description When running as a Windows service, Jenkins is unable to restart itself after installing/upgrading plugins or running /restart. The tail of jenkins.err.log reads:

            """
            WARNING: Failed to restart Hudson
            java.io.IOException: Restarting a service
            [Jenkins] $ "C:\Program Files (x86)\Jenkins\jenkins.exe" restart

            at hudson.lifecycle.WindowsServiceLifecycle.restart(WindowsServiceLifecycle.java:135)
            at jenkins.model.Jenkins$23.run(Jenkins.java:3288)
            """

            Seeing this issue on two different Windows machines. Can be tested with a stock installation of jenkins-1.559.msi. After Jenkins is installed, go to localhost:8080/restart and restart. The Jenkins service will stop but not restart, and the above error can be seen in the err log.

            Went back and tested 1.549, 1.554, 1.557 and 1.558. None of these exhibited this problem. Reinstalled 1.559, and saw the problem immediately.

            Work-around is to run Windows Services manager and manually restart Jenkins service.
            When running as a Windows service, Jenkins is unable to restart itself after installing/upgrading plugins or running /restart. The tail of jenkins.err.log reads:

            """
            WARNING: Failed to restart Hudson
            java.io.IOException: Restarting a service
            [Jenkins] $ "C:\Program Files (x86)\Jenkins\jenkins.exe" restart

            at hudson.lifecycle.WindowsServiceLifecycle.restart(WindowsServiceLifecycle.java:135)
            at jenkins.model.Jenkins$23.run(Jenkins.java:3288)
            """

            Additionally, jenkins.wrapper.log shows the following error:

            """
            2014-04-16 16:54:57 - Starting C:\Program Files (x86)\Jenkins\jre\bin\java -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "C:\Program Files (x86)\Jenkins\jenkins.war" --httpPort=8080
            2014-04-16 16:54:57 - Started 1796
            2014-04-17 18:14:19 - Stopping jenkins
            2014-04-17 18:14:19 - ProcessKill 1796
            2014-04-17 18:14:19 - Send SIGINT 1796
            2014-04-17 18:14:19 - SIGINT to1796 successful
            2014-04-17 18:14:19 - Send SIGINT 1796
            2014-04-17 18:14:19 - SIGINT to 1796 failed - Killing as fallback
            2014-04-17 18:14:19 - Finished jenkins
            """

            On previous versions of Jenkins, none of the lines with "SIGINT" are present, and restart works as expected.

            Seeing this issue on two different Windows machines. Can be tested with a stock installation of jenkins-1.559.msi. After Jenkins is installed, go to localhost:8080/restart and restart. The Jenkins service will stop but not restart, and the above error can be seen in the err log.

            Went back and tested 1.549, 1.554, 1.557 and 1.558. None of these exhibited this problem. Reinstalled 1.559, and saw the problem immediately.

            Work-around is to run Windows Services manager and manually restart Jenkins service.
            danielbeck Daniel Beck made changes -
            Link This issue is duplicated by JENKINS-23147 [ JENKINS-23147 ]
            oleg_nenashev Oleg Nenashev made changes -
            Assignee JCK [ sdcgm ]
            oleg_nenashev Oleg Nenashev made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels jenkins service windows jenkins lts-candidate service windows
            scm_issue_link SCM/JIRA link daemon made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            olivergondza Oliver Gondža made changes -
            Labels jenkins lts-candidate service windows 1.554.3-fixed jenkins service windows
            jglick Jesse Glick made changes -
            Labels 1.554.3-fixed jenkins service windows 1.554.3-fixed jenkins lts-candidate service windows
            olivergondza Oliver Gondža made changes -
            Labels 1.554.3-fixed jenkins lts-candidate service windows 1.554.3-fixed 1.565.1-fixed jenkins lts-candidate service windows
            olivergondza Oliver Gondža made changes -
            Labels 1.554.3-fixed 1.565.1-fixed jenkins lts-candidate service windows 1.554.3-fixed 1.565.1-fixed jenkins service windows
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-24238 [ JENKINS-24238 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 154796 ] JNJira + In-Review [ 195030 ]

              People

              • Assignee:
                sdcgm JCK
                Reporter:
                sdcgm JCK
              • Votes:
                6 Vote for this issue
                Watchers:
                17 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: