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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            If https://github.com/jenkinsci/remoting/pull/478 gets a green build, https://repo.jenkins-ci.org/native/incrementals/org/jenkins-ci/main/remoting/4.11-rc2954.2fca0f20eb1d/remoting-4.11-rc2954.2fca0f20eb1d.jar should be published which would be an agent JAR that (if I understand correctly) would solve this issue. Anyone able to reproduce this issue who cares to try it?

            Show
            jglick Jesse Glick added a comment - If https://github.com/jenkinsci/remoting/pull/478 gets a green build, https://repo.jenkins-ci.org/native/incrementals/org/jenkins-ci/main/remoting/4.11-rc2954.2fca0f20eb1d/remoting-4.11-rc2954.2fca0f20eb1d.jar should be published which would be an agent JAR that (if I understand correctly) would solve this issue. Anyone able to reproduce this issue who cares to try it?
            Hide
            felipecassiors Felipe Santos added a comment -

            I'm willing to test, but sadly, it seems that the build failed.

            Show
            felipecassiors Felipe Santos added a comment - I'm willing to test, but sadly, it seems that the build failed.
            Hide
            jglick Jesse Glick added a comment - - edited

            Indeed. CI seems to be broken in trunk—some sort of environmental issue (lack of RAM?), pending some work from a maintainer. If you are set up to do so, you could run a Maven build locally:

            mvn -Pquick-build package
            

            using the resulting target/remoting-4.11-SNAPSHOT.jar. I could of course attach a binary here but you should not be in the habit of running binaries built from my laptop!

            Show
            jglick Jesse Glick added a comment - - edited Indeed. CI seems to be broken in trunk—some sort of environmental issue (lack of RAM?), pending some work from a maintainer. If you are set up to do so, you could run a Maven build locally: mvn -Pquick-build package using the resulting target/remoting-4.11-SNAPSHOT.jar . I could of course attach a binary here but you should not be in the habit of running binaries built from my laptop!
            Hide
            oxygenxo Andrey Babushkin added a comment -

            I've faced this when tried to use jenkins/inbound-agent:4.10-2-alpine based Docker image for jnlp containers in Kubernetes pods, but, in my case, switching to Ubuntu 20.04 based image helped. Its configuration includes:

            $ java -version
            openjdk version "11.0.11" 2021-04-20
            OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
            OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
            

            and quite old agent.jar version:

            $ java -jar /usr/share/jenkins/agent.jar -version
            3.36
            
            Show
            oxygenxo Andrey Babushkin added a comment - I've faced this when tried to use jenkins/inbound-agent:4.10-2-alpine based Docker image for jnlp containers in Kubernetes pods, but, in my case, switching to Ubuntu 20.04 based image helped. Its configuration includes: $ java -version openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing) and quite old agent.jar version: $ java -jar /usr/share/jenkins/agent.jar -version 3.36
            Hide
            jeffret Jeff Thompson added a comment -

            Andrey Babushkin keep in mind that 3.36 lacks security fixes that have been published.

            Show
            jeffret Jeff Thompson added a comment - Andrey Babushkin keep in mind that 3.36 lacks security fixes that have been published.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              build_admiral Fred Vogt
              Votes:
              9 Vote for this issue
              Watchers:
              22 Start watching this issue

                Dates

                Created:
                Updated: