Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to allow slaves to connect to jenkins master without "-secret" jnlp option?

Yesterday, my jenkins master (v 1.646, linux debian Jessie 8.3) was working and several slaves was connecting on it via the jnlp command:

java -jar slave.jar -jnlpUrl http://myhost:8080/computer/bob-pc.local/slave-agent.jnlp

Now I guess something changed (war update ? plugin update ? security option changed ?) because now my slaves cant connect anymore since the jnlp command is now :

java -jar slave.jar -jnlpUrl http://myhost:8080/computer/bob-pc.local/slave-agent.jnlp -secret rt435te435a208c7201d99f7b1e5dd9c044da86d12efd8527

The -secret ... part of the command is new and I cant figure out which change added this option.

How to allow slaves to connect to jenkins master without "-secret" jnlp option ?

like image 686
norisknofun Avatar asked Apr 08 '16 14:04

norisknofun


People also ask

How many ways we can connect slaves in Jenkins?

There are two ways of authentication for setting up the Linux Jenkins slave agents.

What is JNLP port in Jenkins?

JNLP Port. Jenkins slaves running in OpenShift communicate with the Jenkins master using a separate TCP connection. The TCP port to make use of is specified in the Configure Global Security within Jenkins management page.


1 Answers

This credential behavior is controlled by Matrix Authorization Strategy Plugin, this plugin is shipped with jenkins by default.

If you are the jenkins administrator, you can turn this off by following these steps:

Manage Jenkins -->Configure Global Security-->Access Control-->Authorization

Either in Matrix-based security or Project-based Matrix Authorization Strategy, make sure you you have checked the Connect options of Slave for Anonymous role.

enter image description here

like image 110
mainframer Avatar answered Oct 12 '22 07:10

mainframer