Connected via JNLP agent message and unable to launch jnlp

sumant picture sumant · Jan 9, 2016 · Viewed 12.9k times · Source

I am following the steps here and configured a node with the option launch slave agents via web start. When I save on the master it asks me to launch the agent from browser or a slave as expected.

https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines

Now, when I go to the slave and use the URL to launch the agent from the browser, it shows the message "Connected via JNLP agent" and doesn't show the option to launch jnlp agent.

Tried multiple browsers but no luck.

Any help here?

Answer

Bruno Lavit picture Bruno Lavit · Jan 13, 2016

Windows 2008 & 2012 are a nightmare when you want to configure a JNLP slave.

The old solution (click on JNLP link and install as a service) doesn't work anymore...

I found a nice workaround here: https://wiki.jenkins-ci.org/display/JENKINS/Launch+Java+Web+Start+slave+agent+via+Windows+Scheduler

In a few words, the idea is to:

  • Create a JNLP slave with Jenkins
  • Copy the JNLP URL (java -jar slave.jar -jnlpUrl ...)
  • Create a C:\Jenkins folder (on your Windows slave)
  • Download the slave.jar file in this folder (http://YOUR_JENKINS_URL/jnlpJars/slave.jar)
  • Create a task (with the Windows Task Scheduler) to call this URL (following the procedure and my first link)

I did a quick test on a Windows 2012 server and it works :)

If you are getting a certificate error, you can add this option:

java -jar slave.jar -noCertificateCheck -jnlpUrl ...