TCP Slave Agent Port Disabled by Default in 2.0?

2,062 views
Skip to first unread message

Karl Davis

unread,
Apr 8, 2016, 5:41:29 PM4/8/16
to Jenkins Users
Howdy all,

As I mentioned in my last post, I'm trying to automate the setup of Jenkins 2.0. I've gotten a bit further, but now I'm running into a new problem: 'Manage Jenkins > Configure Global Security > TCP port for JNLP agents' is set to "Disabled" in new installs, by default. Further, it doesn't seem to be honoring the 'jenkins.model.Jenkins.slaveAgentPort' system property (as specified on Features controlled by system properties).

Is this a bug, or is this just no longer supported?

Verifying that I have the property set via Bash:
ubuntu@ip-172-31-53-116:~$ ps aux|grep java
jenkins  14419  0.0  0.0  18744   604 ?        S    21:27   0:00 /usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java -Djava.awt.headless=true -Djenkins.install.runSetupWizard=false -Djenkins.model.Jenkins.slaveAgentPort=16123 -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 --prefix=/jenkins
jenkins  14420  6.4 12.0 2476940 488960 ?      Sl   21:27   0:14 /usr/bin/java -Djava.awt.headless=true -Djenkins.install.runSetupWizard=false -Djenkins.model.Jenkins.slaveAgentPort=16123 -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 --prefix=/jenkins
ubuntu   16387  0.0  0.0  10460   936 pts/0    S+   21:31   0:00 grep --color=auto java

Verifying that the property is being ignored via the script console:
println(Jenkins.instance.slaveAgentPort)
-1

Thanks for the help!
Karl M. Davis

Daniel Beck

unread,
Apr 8, 2016, 9:29:00 PM4/8/16
to jenkins...@googlegroups.com

On 08.04.2016, at 23:41, Karl Davis <ka...@davisonlinehome.name> wrote:

> Is this a bug, or is this just no longer supported?

This is part of the safe(r) defaults. Many installations don't need this, so we default to disabled.

FWIW I'm open to changing this again, or perhaps make it part of the initial setup (which will not help the automation case, but still), based on user feedback.

Mike Albert

unread,
May 3, 2016, 2:38:22 PM5/3/16
to Jenkins Users
For anyone else who stumbles upon this post via a Google Search, Karl found a solution and it can be found in his repo below:


Thanks Karl!
Reply all
Reply to author
Forward
0 new messages