Problems launching the slave agent via Java Web Start on Jenkins

AltF4_ picture AltF4_ · Jan 11, 2013 · Viewed 60.1k times · Source

We have recently upgraded Jenkins to the latest verion.

and since then ive not been able to launch the slaves via Java WebStart through the command line everytime I try to launch it I get "Unable to Launch the application" error

with this in the details panel

CouldNotLoadArgumentException[ Could not load file/URL specified: http://MyServer:8080/computer/Slave1/slave-agent.jnlp]
    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$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

When try browsing to the Jenkins site and lunching it from there IT WORKS however if you then restart the box then the command line on the start up fails to do the job.

This is the command I am trying to run from the slave

cd "C:\Program Files (x86)\Java\jre7\bin"
javaws http://MyServer:8080/computer/Slave1/slave-agent.jnlp

The problem is that this used to work. I have also tried updating to the latest version of Java but no luck,

Any Idea anyone?

Answer

Jason Swager picture Jason Swager · Jan 11, 2013

Supposedly, due in most part to posts on the Jenkins forums, this new behavior is due to a fix for a security issue: https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2013-01-04

Two solutions seem to be coming up:

  1. Download the JNLP file (via browser, wget, curl, whatever) then run locally - may require extra parameters.
  2. Go to Manage Jenkins -> Configure Global Security, and under Project-based Matrix Authorization Strategy, enable “connect” in the “slave” section, for user “Anonymous”. This would leave you open to attack where someone emulates a slave (but in my case, on a private work network - that's not an issue.)