-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-26580] Updated implementation of Jnlp3 protocol
- Loading branch information
Showing
1 changed file
with
64 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated to 1.655 on both server and slave. When I start the slave, I get this:
Mar 28, 2016 3:07:05 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Server didn't accept the handshake: Unknown protocol:Protocol:JNLP3-connect
Other than updating to 1.655, is there anything else I need to do to get JNLP3 working?
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeffkayser2
I think it's due to this piece of code:
jenkins/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol3.java
Lines 128 to 136 in 6d3e054
Maybe it makes sense to explicitly set jenkins.slaves.JnlpSlaveAgentProtocol3.enabled on the server side
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to do what you are suggesting. I saw the code that you referenced, but it was not clear to me how to enable it. Is there a command line option that you have to set explicitly for JNLP3 to work?
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there is a system property.
You would get it set up by starting Jenkins with following settings:
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification. That worked great!
Mar 28, 2016 10:58:20 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP3-connect
Mar 28, 2016 10:58:21 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
Thank you so much.
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm running into an issue with JNLP3. I have three slaves communicating through a proxy, so by the time the traffic gets to the master, they are coming from the same IP address. With JNLP3, I can't get more than one slave connected at a time. Other slaves connect, but then I get a message:
WARNING: Making {slave name} offline because it’s not responding
Mar 28, 2016 11:35:31 PM hudson.node_monitors.ResponseTimeMonitor$1 monitor
If I remove the "-Djenkins.slaves.JnlpSlaveAgentProtocol3.enabled=true" switch (reverting to JNLP2), I can connect multiple slaves at the same time, no issues.
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarification: the three slaves have the same IP address (from the perspective of the master), but the remote source ports are all different (they are ephemeral ports).
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeffkayser2 It makes sense to create a bug for it. JNLP3 is a sensitive security feature, so I think it will be a high priority if it gets confirmed.
CC @daniel-beck @kohsuke @akshayabd
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created issue SECURITY-259: Can only connect one JNLP3 slave per IP address. Sorry if that is the wrong category.
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm interesting use-case, let me see if its possible to reproduce the issue when multiple JNLP3 nodes run on the same machine, ie. can we reproduce the issue without a proxy first.
e9f5caa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akshayabd Thanks for looking into it! FYI we've moved the issue to the common tracker. Now it's JENKINS-33886