Java 11 and launch agent from browser

Hi,

I am setting up jenkins, and I noticed a warning about upgrading to java 11, so I did the upgrade. When I start trying to setup the agents I noticed the icon “launch agent from browser” is now missing. I gather this is because of java 11, and this button would only show up for java 8? This button made it pretty easy to setup an agent before, how do I go about setting up the agent without that button?

This link was really helpful
https://wiki.jenkins.io/JENKINS/Step-by-step-guide-to-set-up-master-and-agent-machines-on-Windows.html

And I remember this part being relevant.

That link is from 2018, I’ve tried everything thats been recommended online but I think things have changed in the newer version of jenkins and/or because its java 11. Like there is no “launch agent by connecting to master” anymore. Now it is “launch agent by connecting it to the controller”.

that’s the option, master is now controller.

2 Likes

yeah I have that selected, the launch icon still doesn’t show up.

I’d have to go dig up links, but I believe that feature was removed out of the java language. Not really a case of jenkins removing a used feature, but flat out unavailable now.

So easiest way these days is either outgoing connection (via winrm or ssh or something), or incoming connection (jnlp over tcp or websocket).

I think from what i remember of web start, incoming is what you want. Which is follow the onscreen instructions. Download agent.jar, then run agent.jar with the key provided.

Fill out any details you need. Then select the offline node and you should get connection steps

1 Like

Several videos and text instructions for inbound agents are included at

Additional information on outbound (ssh) agents are available at:

Java webstart removal is described in the upgrading from Java 8 to Java 11 documentation at:

https://www.jenkins.io/doc/administration/requirements/upgrade-java-guidelines/#java-web-start

It says:

Java Web Start has been removed in Java 11. When a Jenkins controller runs on Java 11, the Java Web Start button will no longer appear in the Web UI. You can’t launch agents for a Java 11 Jenkins server from a *.jnlp file downloaded to a web browser.

There are no plans to replace this functionality. Connect agents to Jenkins on Java 11 with plugins like SSH Build Agents Plugin, with operating system command line calls to java -jar agent.jar, or using containers.

1 Like

ok thanks, i downloaded the agent.jar and ran the command and was able to connect.

1 Like

Thanks for you feedback @CraigLaMorte .

I am now using command prompt and run the command using agent.jar to establish the agent connection. However, the agent connection disconnects randomly. Is there a way to run this as a service?