Hi All,

Just as a headsup, the instructions at the following URL no longer work when it comes to getting a Windows slave working as a service:

https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service

On 11/01/2013 14:26, Kohsuke Kawaguchi wrote:
In the mean time, what I recommend is to manually download the JNLP file
from your browser, then have -jnlpUrl point to the local copy via
file:///path/to/local.jnlp

Working from the above, here's a recipe:

1 - stop the service, it'll be complaining in jenkins-slave.err.log something like the following:

Failing to obtain http://<server>/computer/<node>/slave-agent.jnlp
java.io.IOException: Failed to load http://<server>/computer/<node>/slave-agent.jnlp: 403 Forbidden
        at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:238)
        at hudson.remoting.Launcher.run(Launcher.java:200)
        at hudson.remoting.Launcher.main(Launcher.java:173)
Waiting 10 seconds before retry

2 - make a note of the folder listed in the "Remote FS root" in http://<server>/computer/<node>/configure. In my case, it was C:\Jenkins

3 - using a web browser on the windows box, log in to your jenkins server and go to http://<server>/computer/<node>/, right click on the "Launch" icon and "save as" the slave-agent.jnlp to the folder from (2) above.

4 - in the folder in (2) above, you will find a file called jenkins-slave.xml, edit the -jnlpUrl argument in the <arguments> element and replace "http://<server>/computer/<node>/slave-agent.jnlp" with the path to the file you saved in (3) above. In my case, this was "file:///C:/Jenkins/slave-agent.jnlp".

5 - You should now be good to start the service up again. This time the node should show up as connected on your Jenkins master and the jenkins-slave.err.log on the slave should end in something like:

Jan 19, 2013 5:06:35 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected

I hope a future release will fix the installation of the slave-as-service so these manual steps aren't needed. To whoever does that work, firstly, thankyou in advance :-) While you're at it, could you consider setting the slave service to run as a user other that System? (which is a bit like running as root, if I understand Windows correctly)

I manually set up a "normal" Jenkins user and changed the Jenkins service to run as that user...

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
           - http://www.simplistix.co.uk

Reply via email to