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

Restart fails on Windows master with slaves connected. "SEVERE: Restarting VM as requested by username" (Windows service not running as local system account)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core

      I see this issue at every single restart, safeRestart or not. It seems to be related to the connected slaves:

      aug. 10, 2017 1:00:08 PM jenkins.model.Jenkins$26 run
      INFO: Restart in 10 seconds
      aug. 10, 2017 1:00:18 PM jenkins.model.Jenkins$26 run
      SEVERE: Restarting VM as requested by nkj
      aug. 10, 2017 1:00:18 PM jenkins.model.Jenkins cleanUp
      INFO: Stopping Jenkins
      aug. 10, 2017 1:00:18 PM jenkins.model.Jenkins$21 onAttained
      INFO: Started termination
      aug. 10, 2017 1:00:18 PM jenkins.model.Jenkins$21 onAttained
      INFO: Completed termination
      aug. 10, 2017 1:00:18 PM jenkins.model.Jenkins _cleanUpDisconnectComputers
      INFO: Starting node disconnection
      aug. 10, 2017 1:00:18 PM jenkins.slaves.DefaultJnlpSlaveReceiver channelClosed
      WARNING: safe-restart thread for EAC3 Win10 (dtdkcphpw200044) terminated
      java.nio.channels.ClosedChannelException

      Please NOTE: The Jenkins service runs as an Active Directory user, not a local system account (using "Log on as").

      The result is that Jenkins stops, but never restarts:

      INFO: Waiting for node disconnection completion
      aug. 10, 2017 1:00:20 PM jenkins.model.Jenkins cleanUp
      INFO: Jenkins stopped

      If I look at the service state at this point (after INFO: Jenkins stopped) using "Services", Jenkins appear to be running. A "Restart the service" brings it back up without giving any passwords (password for the user is stored).

          [JENKINS-46123] Restart fails on Windows master with slaves connected. "SEVERE: Restarting VM as requested by username" (Windows service not running as local system account)

          Niels Kristian Jensen created issue -
          Niels Kristian Jensen made changes -
          Attachment New: bug.txt [ 39238 ]

          Oleg Nenashev added a comment -

          Is it a service restart or a system restart? in the latter case I would suggest to enable the delayed start mode or to configure dependencies on the remote auth services. See the documentation here: https://github.com/kohsuke/winsw

          Oleg Nenashev added a comment - Is it a service restart or a system restart? in the latter case I would suggest to enable the delayed start mode or to configure dependencies on the remote auth services. See the documentation here: https://github.com/kohsuke/winsw

          Niels Kristian Jensen added a comment - - edited

          It is a Jenkins restart (e.g. /saferestart ) or the automatic restart after upgrading plugins or Jenkins version. I face no issues, if I restart the service or reboot the computer.

          Niels Kristian Jensen added a comment - - edited It is a Jenkins restart (e.g. /saferestart ) or the automatic restart after upgrading plugins or Jenkins version. I face no issues, if I restart the service or reboot the computer.

          Please let me know if I can provide any more info for this issue?

          Niels Kristian Jensen added a comment - Please let me know if I can provide any more info for this issue?

          Oleg Nenashev added a comment -

          Which version of WinSW do you use on the master just in case?

          Oleg Nenashev added a comment - Which version of WinSW do you use on the master just in case?

          Please forgive me because I do not understand the question. This is my best shot: The server OS is given in the "Environment" section, if I look for "winsw" in the /systemInfo the only match is WINSW_EXECUTABLE D:\Jenkins\jenkins.exe - which is also given in the "Environment" section. I used the "winsw" label, because at first I attached this issue to the comments on another issue and was asked to create a new issue instead - I do not know what "winsw" means. I've searched for "winsw*.*" on the master in the Jenkins directory and the user running the service - but found nothing

          Niels Kristian Jensen added a comment - Please forgive me because I do not understand the question. This is my best shot: The server OS is given in the "Environment" section, if I look for "winsw" in the /systemInfo the only match is WINSW_EXECUTABLE D:\Jenkins\jenkins.exe - which is also given in the "Environment" section. I used the "winsw" label, because at first I attached this issue to the comments on another issue and was asked to create a new issue instead - I do not know what "winsw" means. I've searched for "winsw*.*" on the master in the Jenkins directory and the user running the service - but found nothing

          Oleg Nenashev added a comment -

          jenkins.exe is a renamed WinSW executable. Just send me it's version (it is available in assembly info for the Exe file)

          Oleg Nenashev added a comment - jenkins.exe is a renamed WinSW executable. Just send me it's version (it is available in assembly info for the Exe file)

          Details for jenkins.exe are: File version = Product version = 1.1.0.0 Date modified = 10-05-2015 17:43

          Niels Kristian Jensen added a comment - Details for jenkins.exe are: File version = Product version = 1.1.0.0 Date modified = 10-05-2015 17:43

          Oleg Nenashev added a comment -

          This is the old version.

          Please download new executable from https://github.com/kohsuke/winsw#download , replace jenkins.exe, and then trye again.

          Oleg Nenashev added a comment - This is the old version. Please download new executable from https://github.com/kohsuke/winsw#download , replace jenkins.exe, and then trye again.

            Unassigned Unassigned
            nkjensen Niels Kristian Jensen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: