• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • remoting
    • None

      Open sourcing the JNLPProtocol4 implementation that combines NIO with TLS encryption to resolve the regression to Thread-per-client in JNLPProtocol3

          [JENKINS-36871] JNLPProtocol4

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol4Handler.java
          src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol4PlainHandler.java
          http://jenkins-ci.org/commit/remoting/2ce2f8ac22816813b413f09b37d2c05151eb1b3a
          Log:
          JENKINS-36871 Fix failing tests

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol4Handler.java src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol4PlainHandler.java http://jenkins-ci.org/commit/remoting/2ce2f8ac22816813b413f09b37d2c05151eb1b3a Log: JENKINS-36871 Fix failing tests

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/test/java/org/jenkinsci/remoting/engine/JnlpProtocolHandlerTest.java
          http://jenkins-ci.org/commit/remoting/ac9bcabdb7a69e0cf8e49ca92ce9cad8fd9b6842
          Log:
          JENKINS-36871 Forgot to test JNLP4-plaintext

          Compare: https://github.com/jenkinsci/remoting/compare/0529c154be04...ac9bcabdb7a6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/test/java/org/jenkinsci/remoting/engine/JnlpProtocolHandlerTest.java http://jenkins-ci.org/commit/remoting/ac9bcabdb7a69e0cf8e49ca92ce9cad8fd9b6842 Log: JENKINS-36871 Forgot to test JNLP4-plaintext Compare: https://github.com/jenkinsci/remoting/compare/0529c154be04...ac9bcabdb7a6

          Matthew Barr added a comment -

          Is there any way to tell when this might be released? We're very interested in this work.

          It sounds like this needs a remoting release, which will later make it's way to a jenkins release.

          (We might also be willing to test a nightly, but I'm going to have to figure out a bit more of the process first.)

          Matthew Barr added a comment - Is there any way to tell when this might be released? We're very interested in this work. It sounds like this needs a remoting release, which will later make it's way to a jenkins release. (We might also be willing to test a nightly, but I'm going to have to figure out a bit more of the process first.)

          Antonio Beyah added a comment -

          +1, also interested in this. Any update on when this is expected to be released?

          Antonio Beyah added a comment - +1, also interested in this. Any update on when this is expected to be released?

          Oleg Nenashev added a comment -

          Marking it as Resolved. We're preparing to the Remoting 3.0 release right now

          Oleg Nenashev added a comment - Marking it as Resolved. We're preparing to the Remoting 3.0 release right now

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/jenkins/slaves/DefaultJnlpSlaveReceiver.java
          core/src/main/java/jenkins/slaves/IOHubProvider.java
          core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java
          core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java
          core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java
          core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol3.java
          core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol4.java
          core/src/main/java/jenkins/slaves/JnlpSlaveHandshake.java
          core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description.jelly
          core/src/main/resources/jenkins/slaves/Messages.properties
          core/src/test/java/jenkins/slaves/DefaultJnlpSlaveReceiverTest.java
          pom.xml
          http://jenkins-ci.org/commit/jenkins/71cbe0cc7c601c04509faa618b23194335288fee
          Log:
          [JENKINS-36871, JENKINS-37565] JNLP4-connect implementation and Remoting 3 (#2492)

          • JENKINS-36871 Switch to the new JnlpProtocolHandler based implementation

          Todo

          • [ ] Restore the cookie behaviour (but done right this time)
          • [ ] Perhaps investigate issuing clients with TLS certificates (but would require a UI for managing them)
          • JENKINS-36871 Oleg wants to log an exception that cannot happen

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/jenkins/slaves/DefaultJnlpSlaveReceiver.java core/src/main/java/jenkins/slaves/IOHubProvider.java core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol3.java core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol4.java core/src/main/java/jenkins/slaves/JnlpSlaveHandshake.java core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description.jelly core/src/main/resources/jenkins/slaves/Messages.properties core/src/test/java/jenkins/slaves/DefaultJnlpSlaveReceiverTest.java pom.xml http://jenkins-ci.org/commit/jenkins/71cbe0cc7c601c04509faa618b23194335288fee Log: [JENKINS-36871, JENKINS-37565] JNLP4-connect implementation and Remoting 3 (#2492) JENKINS-36871 Switch to the new JnlpProtocolHandler based implementation Todo [ ] Restore the cookie behaviour (but done right this time) [ ] Perhaps investigate issuing clients with TLS certificates (but would require a UI for managing them) JENKINS-36871 License headers and javadocs JENKINS-36871 Restore cookie handling JENKINS-36871 Integrating Agent discovery components JENKINS-36871 Pick up remoting 3.0-SNAPSHOT JENKINS-36871 Pick up newer snapshot JENKINS-36871 Oleg wants to log an exception that cannot happen

          Oleg Nenashev added a comment -

          The fix is integrated towards 2.27

          Oleg Nenashev added a comment - The fix is integrated towards 2.27

          Sam Gleske added a comment - - edited

          How does one confirm that JNLP4 is being used? I tried the latest Jenkins ver. 2.38 (weekly) and configured a JNLP slave (there's no option to configure what kind of JNLP slave).

          Additionally, the agent logs don't show much in the way of output confirming which JNLP protocol is even being used. Here's the full log output from the initialization of the JNLP slave.

          JNLP agent connected from /REDACTED
          <===[JENKINS REMOTING CAPACITY]===>Slave.jar version: 3.3
          This is a Unix agent
          Agent successfully connected and online
          

          So far, I'm not sure how to tell what protocol is being used.

          Sam Gleske added a comment - - edited How does one confirm that JNLP4 is being used? I tried the latest Jenkins ver. 2.38 (weekly) and configured a JNLP slave (there's no option to configure what kind of JNLP slave). Additionally, the agent logs don't show much in the way of output confirming which JNLP protocol is even being used. Here's the full log output from the initialization of the JNLP slave. JNLP agent connected from /REDACTED <===[JENKINS REMOTING CAPACITY]===>Slave.jar version: 3.3 This is a Unix agent Agent successfully connected and online So far, I'm not sure how to tell what protocol is being used.

          Sam Gleske added a comment -

          Nevermind, I found it in Manage Jenkins > Configure Global Security > JNLP. In the Advanced section, you have to enable JNLP4 (and can optionally disable the other protocols). Then if you look at the agent log you can see the JNLP4 class being used in the thread dump output. It would be nice if the agent Log output displayed which protocol it is using in the agent startup information.

          Sam Gleske added a comment - Nevermind, I found it in Manage Jenkins > Configure Global Security > JNLP . In the Advanced section, you have to enable JNLP4 (and can optionally disable the other protocols). Then if you look at the agent log you can see the JNLP4 class being used in the thread dump output. It would be nice if the agent Log output displayed which protocol it is using in the agent startup information.

          Sam Gleske added a comment -

          It would be nice if the agent Log output displayed which protocol it is using in the agent startup information.

          I created JENKINS-40700 as an enhancement.

          Sam Gleske added a comment - It would be nice if the agent Log output displayed which protocol it is using in the agent startup information. I created JENKINS-40700 as an enhancement.

            stephenconnolly Stephen Connolly
            stephenconnolly Stephen Connolly
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: