Local Jenkins server does not have slave.jar or slave-agent.jnlp - Impossible to create slave/build node

Asyranok picture Asyranok · Oct 16, 2018 · Viewed 9.6k times · Source

I have a local Jenkins server that I've set up and created jobs for. I am trying to register new slave/build machines, but Jenkins refuses to offer a slave.jar or slave-agent.jnlp

These files simply don't exist. Permissions are currently set to be granted in full to every user. When visiting the the agent node in Jenkins from the new slave machine, I simply see the blue "Launch Agent" button and not the orange "Launch" option that downloads and runs the slave.jar file.

I've looked through many tutorials and all act as if this process is automatic, and they all show an orange "Launch" button that will download the slave.jar. No one seems to have had this problem yet. Any help is greatly appreciated.

No options to download

enter image description here

Answer

ben5556 picture ben5556 · Oct 18, 2018

Jenkins -> Manage Jenkins -> Configure Global Security -> To enable TCP port for JNLP agents set it to Random

In node configuration, change the Launch method to Launch agent via Java Web Start

Make sure Java is installed on your slave node

Now login to slave node, open browser and browse jenkins UI

Go to Manage Jenkins -> Manage Nodes -> Select the slave node

You should now see the Orange launch button. Click on the launch button to download the file

Now run the command shown on the screen in command prompt window

Slave should now be connected