Wednesday, December 15, 2010

Hudson - Setting up Windows Slave

Several of my colleagues  had trouble installing Hudson slave on a Windows machine. I was at a client site, and so decided to write step-by-step instructions for installing the same. It worked, and everyone was happy. So, here comes the instructions with screen shots.

1.    Log into the windows machine where the slave needs to be setup.
2.    Open up a browser and connect to the master. http://yourmaster:yourport. In my case, it is http://windowsserver:7223
3.    Click on Manage Hudson -> Manage Nodes. This will bring the following page:

4. Click on New Node. Provide a slave name and check on Dumb Node, and click OK.

5.Next, provide all the details for this slave

6. Save the setting. Put the slave.jar in a folder. From this folder run the following command:
java -jar slave.jar -jnlpUrl http://yourmasterserver:7223/computer/windowsslave/slave-agent.jnlp
windowsslave is the name you gave for the slave machine

7. This will start the slave, and you should see it running as follows:

 8.    And the slave should be listed on your Hudson Master dashboard as shown below:

The folder specified while configuring the slave will have the following slaves libraries downloaded:
  • maven2.1-interceptor.jar
  • maven-agent.jar
  • maven-interceptor.jar
Wasn't that easy?


  1. From Where we will get slave.jar file.and which path we need to specify in Remote FS root.

  2. When you connect to the Master from the slave machine, it downloads the slave.jar as well.

  3. saved a buch of time !! Thanks! :)

  4. Thanks a lot, I configured as mentioned but I face a problem.

    When I close the slave command prompt
    I get a error message as " hudson slave connection was broken " on the master node

    Why is this happening ?

    1. Am also facing this problem. Kindly let me know the solution

  5. Just wondering.. is it possible for a slave to download the latest from SVN and run msbuild and nant tasks?

  6. when i am trying to run the below command from slave machine i geting the below issue.Could you please help me on this

    C:\Program Files (x86)\Java\jre6\bin>java -jar d:/hudson/_slave.jar -jnlpUrl htt

    Failing to obtain
    .jnlp Failed to load
    /Slave/slave-agent.jnlp: 404 Not Found
    at hudson.remoting.Launcher.parseJnlpArguments(
    at hudson.remoting.Launcher.main(

  7. What value should I put in for "Remote FS root"?
    I saw you put /root/, but that looks like a UNIX path, while the slave is a Windows box.



  8. Hi Meera,

    Thank your for the nice article, Could you please let me know if i can new add node using hudson-cli.jar then i want to use this node for various builds. if you had tried adding node please let me know the steps.


    1. I haven't tried adding new nodes using the cli.jar.

  9. CouldNotLoadArgumentException[ Could not load file/URL specified:]
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$ Source)
    at Source)
    i am getting this issue could you please let me know