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

Crash while attempting to install multiple slaves as a windows service on a single computer

    Details

    • Similar Issues:

      Description

      I can launch a slave using web-start and then install it as a windows service. After some manual configuration this service reliably starts up & connects to the master node.

      For various reasons some of our more powerful servers are shared between teams which have their own jenkins master nodes. Previously (with Hudson) we ran multiple web-start clients (not as a service) which allowed for any number of slaves to run on one computer (providing they were configured with unique directories)

      Recently we were forced to switch to using a service - as a consequence we have noticed that it is no longer possible to install more than one Jenkins slave service on any single box.

      Steps to re-create:

      • Ensure that your slave hosting PC does NOT have any Jenkins slave services configured (use sc command to delete if needed)
      • Set up 2 nodes on Jenkins master, give each different directories
      • Launch the first node & configure to run as a service. Verify that slave is running.
      • Launch the 2nd node & configure to run as a service

      Result:

      • First slave installs OK, second slave will crash on service installation
      • The 2nd windows service will not be created

      Conclusion:

      • The existance of a previously installed Jenkins service will always cause any subsequent jenkins service installations to fail.

      How are we running Jenkins?

      • Tomcat 7 on a Windows 64bit host
      • Slaves are launched via Web-start & then installed as a service.

      With which Java VM (Oracle, IBM etc.)?

      • Oracle, latest in 1.6 series, 64bit

      On which operating system? 32- or 64-bit?

      • Windows 2003 Server R2 64bit for server
      • Windows XP 32bit for slaves

      Did this error start occurring after an upgrade?

      • No

        Attachments

          Activity

          Hide
          scf1 Salim Fadhley added a comment -

          FYI, I might explan something of our rationale:

          We have a certain category of processes which depend on Excel (controlled via COM). We can only have a single instance of this kind of process on any single box. The solution we have come by is to run two slaves on each box - one reserved for Excel jobs only. The other to handle everything else.

          This worked very well until a corporate security policy change banned the use of unattended PCs left logged in. Henceforth all our processes would need to run as services.

          We might still be able to do this, however I'm going to have to manually configure all the services which will be time-consuming. We have a very large number of boxes to configure. It would be a great help to me if I could set up multiple services on any single box - that way I would not need to dramatically re-organize my Jenkins system.

          Show
          scf1 Salim Fadhley added a comment - FYI, I might explan something of our rationale: We have a certain category of processes which depend on Excel (controlled via COM). We can only have a single instance of this kind of process on any single box. The solution we have come by is to run two slaves on each box - one reserved for Excel jobs only. The other to handle everything else. This worked very well until a corporate security policy change banned the use of unattended PCs left logged in. Henceforth all our processes would need to run as services. We might still be able to do this, however I'm going to have to manually configure all the services which will be time-consuming. We have a very large number of boxes to configure. It would be a great help to me if I could set up multiple services on any single box - that way I would not need to dramatically re-organize my Jenkins system.
          Hide
          salimfadhley salimfadhley added a comment -

          FYI, the work-around for this bug was to manually configure services. I made a Windows batch-file which set up file dependancies and then added the required objects to services.msc. It's not very satisfying but it was sufficient for my purposes.

          Show
          salimfadhley salimfadhley added a comment - FYI, the work-around for this bug was to manually configure services. I made a Windows batch-file which set up file dependancies and then added the required objects to services.msc. It's not very satisfying but it was sufficient for my purposes.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          You could just rename services via regedit.
          BTW, a naming dialog would be useful

          Show
          oleg_nenashev Oleg Nenashev added a comment - You could just rename services via regedit. BTW, a naming dialog would be useful
          Show
          oleg_nenashev Oleg Nenashev added a comment - It has been fixed in https://github.com/jenkinsci/windows-slave-installer-module/pull/2

            People

            • Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              scf1 Salim Fadhley
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: