28

I have already configured the java enviroment and installtion path

Here is the picture

Jaap
  • 81,064
  • 34
  • 182
  • 193
shuiqiang
  • 437
  • 1
  • 6
  • 11
  • There is a new update that resolves this issue. Please reference https://stackoverflow.com/a/56107776 –  Nov 05 '19 at 22:17

6 Answers6

37

This is a duplicate question from Server Fault: Answer Here

Java Web Start utilizes TCP so it has to be enabled and configured in Jenkins...

  1. Login to Jenkins as admin
  2. Manage Jenkins > Configure Global Security > TCP port for JNLP agents

Do yourself a favor and pick a static port assignment...

ѺȐeallү
  • 2,887
  • 3
  • 22
  • 34
  • 7
    This may be a legitimate cause, but it seems per the other answer that newer Jenkins versions have renamed the JNLP launch option to something else, so even if the JNLP port is configured, no "Launch via Java Web Start" option will be shown. – Christopher Hunter Dec 04 '19 at 21:53
23

As of Jenkins version 2.176.3, there is option enabled when "Launch agent by connecting it to the master" which is same as "launch agent via java web start" once you enable the "Manage Jenkins => Configure Global Security => Agents => TCP port for inbound agents" as mentioned above. e.g. Fixed: 50000

tyro
  • 577
  • 8
  • 17
  • 3
    Good to know, because as of 2.190.2, if you select "Let Jenkins control this Windows Slave as a Windows Service" it gives a message that specifically says "...Consider using Launch agents using Java Web Start instead" even when there is no option called "Java Web Start" – Christopher Hunter Dec 04 '19 at 21:50
4

Make sure that you've enabled a JNLP port in Manager Jenkins -> Configure Global Security. If no JNLP port is specified, then the JNLP slave option will not appear.

Jason Swager
  • 6,421
  • 6
  • 41
  • 56
2

I had similar issue after updating my Jenkins, I then used "Launch agent by connecting it to the master" method to launch and my port "TCP port for inbound agents" under - Manage Jenkins => Configure Global Security => Agents => TCP port for inbound agents got changed to 8888. I have updated it back to 50000 and that resolved the issue. Hope it helps.

BalaGoud
  • 21
  • 1
1

On some systems I used to get a button to download the agent's JNLP. On my new linux mint system, I instead get the "JNLP not available" message. So was lost as to where to get the JNLP file. However, looking in the command below I saw the URL for downloading it, eg:

http://127.0.0.1:8080/computer/build_slave/jenkins-agent.jnlp

Go to the slave machine, paste the URL in the browser to download it!

0

This might also be due to missing permissions for the user trying to setup the agent via java web start, at least that was the case in my scenario;

To verify this, try to download the jnlp directly; URL would be of the form [jenkins url]/computer/[agent name]/slave-agent.jnlp, if there is a permissions issue you will get something along the lines of:

Access Denied

xxxx is missing the Agent/Connect permission

BlessedHIT
  • 1,849
  • 1
  • 14
  • 21