• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • swarm-plugin
    • None
    • Windows Server 2008,

      This problem exists on both 32bit and 64bit versions of java. I tried both.

      I am unable to get the swarm client to run properly when configured as a windows service. I configured the service using the following command line:

      sc create swarm binpath= "\"C:\Program Files (x86)\Java\jre7\bin\java.exe\" -Xrs -jar c:\swarm\swarm-client-1.9-jar-with-dependencies.jar -executors 2 -fsroot c:\jenkins-slave -labels myLabel -mode exclusive -name NewNode " displayname= "Jenkins Swarm" start= delayed-auto

      When I start the service through Services, I can see that the node becomes active when I look at the homepage on the master. Unfortunately, Windows thinks that it was unsuccessful and terminates the service with the following error:

      Windows could not start the Jenkins Swarm service on Local Computer.
      Error 1053: The service did not respond to the start or control request in a timely fashion.

      I can run the command line manually on the node and it works fine.

      It would be great if this was fixed so that swarm could run as a service.

          [JENKINS-18802] Can't Run Swarm As a Windows Service

          Kalps sat added a comment -

          I am also using swarm plugin to auto connect slave during boot for running selenium testcases. Since the swarm plugin is starting slave agent headless, I see the slave is started in non-interactive mode and hence selenium testcases are failing. Is it possible to expose the slave as windows service when using swarm plugin to manage master-slave, this was I can configure to run the service to run "interactive".

          Or may be there is a way to run the slave interactive way with current swarm design, please point me out.

          Kalps sat added a comment - I am also using swarm plugin to auto connect slave during boot for running selenium testcases. Since the swarm plugin is starting slave agent headless, I see the slave is started in non-interactive mode and hence selenium testcases are failing. Is it possible to expose the slave as windows service when using swarm plugin to manage master-slave, this was I can configure to run the service to run "interactive". Or may be there is a way to run the slave interactive way with current swarm design, please point me out.

          You can't directly run java command as a windows service.
          Command configured to start a service is supposed to return status, and service to run as a daemon.
          I suggest you install a windows slave (java web start) to get a service created with adequate launcher executable, then change the command line in xml configuration file so that it start swarm plugin agent.

          Nicolas De Loof added a comment - You can't directly run java command as a windows service. Command configured to start a service is supposed to return status, and service to run as a daemon. I suggest you install a windows slave (java web start) to get a service created with adequate launcher executable, then change the command line in xml configuration file so that it start swarm plugin agent.

          closing

          Peter Jönsson added a comment - closing

          Rob Duff added a comment -

          (Just for those stumbling upon this issue looking for an answer... https://github.com/kohsuke/winsw)

          Rob Duff added a comment - (Just for those stumbling upon this issue looking for an answer... https://github.com/kohsuke/winsw )

            mindjiver Peter Jönsson
            timjohnston tim johnston
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: