Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61212

CLI, Agent -websockets DeploymentException: Handshake response not received on jdk-11

    • 2.317

      Testing CLI, agent connections with the new '-websocket' functionality added by
      JEP-222.

       

      Jetty access log shows:

      172.18.0.3 - - [25/Feb/2020:01:48:06 +0000] "GET /cli/ws HTTP/1.1" 101 0 "-" "-" 
      

      CLI output:

      javax.websocket.DeploymentException: Handshake response not received.
      	at org.glassfish.tyrus.client.ClientManager$3$1.run(ClientManager.java:694)
      	at org.glassfish.tyrus.client.ClientManager$3.run(ClientManager.java:712)
      ...
      	at org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(ClientManager.java:866)
      	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
      	at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:511)
      	at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:355)
      	at hudson.cli.CLI.webSocketConnection(CLI.java:323)
      	at hudson.cli.CLI._main(CLI.java:301)
      	at hudson.cli.CLI.main(CLI.java:95)
      

      When I attach a debugger to the Jenkins server it seems to get stuck here:
      https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/cli/CLIAction.java#L255

          [JENKINS-61212] CLI, Agent -websockets DeploymentException: Handshake response not received on jdk-11

          Fred Vogt added a comment -

          danielbeck markewaite - I noticed this was mentioned in the `v2.313` https://www.jenkins.io/changelog/.

           

          I can update my original test environment to confirm the fix is in `v2.313`.

          Fred Vogt added a comment - danielbeck markewaite  - I noticed this was mentioned in the `v2.313` https://www.jenkins.io/changelog/.   I can update my original test environment to confirm the fix is in `v2.313`.

          Mark Waite added a comment -

          Thanks build_admiral. danielbeck I set this as "Closed" because it was mentioned in the 2.313 changelog and did not seem to have obvious other cases which would prompt deeper testing before marking it as "Fixed in 2.313".

          Should I be doing more rigorous verification of fixes that are in Jenkins core weekly releases before they are listed as "Fixed in release x.yyy"?

          Mark Waite added a comment - Thanks build_admiral . danielbeck I set this as "Closed" because it was mentioned in the 2.313 changelog and did not seem to have obvious other cases which would prompt deeper testing before marking it as "Fixed in 2.313". Should I be doing more rigorous verification of fixes that are in Jenkins core weekly releases before they are listed as "Fixed in release x.yyy"?

          Daniel Beck added a comment -

          I think this one is unusual, as even Jesse as PR author wrote he didn't test and we have no other confirmation yet. No need to build process around this.

          build_admiral That would be very helpful.

          Daniel Beck added a comment - I think this one is unusual, as even Jesse as PR author wrote he didn't test and we have no other confirmation yet. No need to build process around this. build_admiral That would be very helpful.

          Jesse Glick added a comment -

          This was certainly not fixed for agents; https://github.com/jenkinsci/remoting/pull/478 was just merged, and has not yet been released, much less incorporated into core and that released. It may have been fixed for the CLI.

          Jesse Glick added a comment - This was certainly not fixed for agents; https://github.com/jenkinsci/remoting/pull/478 was just merged, and has not yet been released, much less incorporated into core and that released. It may have been fixed for the CLI.

          Jesse Glick added a comment -

          Jesse Glick added a comment - You can try running https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/main/remoting/4.11-rc2954.2fca0f20eb1d/remoting-4.11-rc2954.2fca0f20eb1d.jar as an agent JAR.

          Felipe Santos added a comment -

          I was able to successfully launch WebSocket JDK11 agents using self-signed CA with the custom agent.jar posted above, via https://github.com/felipecrs/jenkins-agent-dind/pull/34 which can be tested with:

          docker pull ghcr.io/felipecrs/jenkins-agent-dind:pr-34
          

          In case someone else wants to try.

          Felipe Santos added a comment - I was able to successfully launch WebSocket JDK11 agents using self-signed CA with the custom agent.jar posted above, via https://github.com/felipecrs/jenkins-agent-dind/pull/34 which can be tested with: docker pull ghcr.io/felipecrs/jenkins-agent-dind:pr-34 In case someone else wants to try.

          Jesse Glick added a comment -

          launch WebSocket JDK11 agents

          Remember that, as per comment of 2020-03-02, the crucial issue seems to be whether the controller was running 8 or 11. So please test that specifically, if you have not done so already.

          Jesse Glick added a comment - launch WebSocket JDK11 agents Remember that, as per comment of 2020-03-02, the crucial issue seems to be whether the controller was running 8 or 11. So please test that specifically, if you have not done so already.

          Felipe Santos added a comment -

          My controller is using JDK11 always. But regardless, I previously tested the Agent with JDK11 (without the fix) and it was not working.

          Felipe Santos added a comment - My controller is using JDK11 always. But regardless, I previously tested the Agent with JDK11 (without the fix) and it was not working.

          Jesse Glick added a comment -

          Good news—that means we can have some confidence in marking this fixed once the remoting change is integrated into a core weekly.

          Jesse Glick added a comment - Good news—that means we can have some confidence in marking this fixed once the remoting change is integrated into a core weekly.

          Oleg Nenashev added a comment -

          *  The fix was released in Remoting 4.11

          Oleg Nenashev added a comment - *  The fix was released in Remoting 4.11 https://github.com/jenkinsci/jenkins/pull/5821  picks up the fix into the Weekly. Should be released next week in 2.317

            Unassigned Unassigned
            build_admiral Fred Vogt
            Votes:
            9 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: