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

JNLP agents fails to connect sometimes after upgrading to Jenkins 2.277.1

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: kubernetes-plugin, remoting
    • Labels:
      None
    • Environment:
      Jenkins 2.277.1
      Agent Remoting 4.7
      AdoptOpenJDK 8 in both Jenkins Master container and the Agent
      Kubernetes Plugin 1.29.2
    • Similar Issues:

      Description

      Since I upgraded to Jenkins 2.277.1 (via docker), most of the times that the Kubernetes Plugin tries to create new agents it fails. This is causing the jobs to stay in the queue for a very long time.

      This is the trace which `jenkins-agent` gives in the container logs:

      Mar 15, 2021 9:21:36 PM hudson.remoting.jnlp.Main createEngine
      INFO: Setting up agent: small-volume-rpzzd
      Mar 15, 2021 9:21:36 PM hudson.remoting.jnlp.Main$CuiListener <init>
      INFO: Jenkins agent is running in headless mode.
      Mar 15, 2021 9:21:36 PM hudson.remoting.Engine startEngine
      INFO: Using Remoting version: 4.7
      Mar 15, 2021 9:21:36 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
      INFO: Using /home/jenkins/agent/remoting as a remoting work directory
      Mar 15, 2021 9:21:36 PM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
      INFO: Both error and output logs will be printed to /home/jenkins/agent/remoting
      Mar 15, 2021 9:21:56 PM hudson.remoting.jnlp.Main$CuiListener error
      SEVERE: Connection failed.
      io.jenkins.remoting.shaded.javax.websocket.DeploymentException: Connection failed.
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.JdkClientContainer$1.call(JdkClientContainer.java:187)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.JdkClientContainer$1.call(JdkClientContainer.java:107)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.JdkClientContainer.openClientSocket(JdkClientContainer.java:192)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager$3$1.run(ClientManager.java:647)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager$3.run(ClientManager.java:696)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(ClientManager.java:849)
              at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:493)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:337)
              at hudson.remoting.Engine.runWebSocket(Engine.java:623)
              at hudson.remoting.Engine.run(Engine.java:470)
      Caused by: java.nio.channels.UnresolvedAddressException
              at sun.nio.ch.Net.checkAddress(Net.java:104)
              at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implConnect(UnixAsynchronousSocketChannelImpl.java:302)
              at sun.nio.ch.AsynchronousSocketChannelImpl.connect(AsynchronousSocketChannelImpl.java:210)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.TransportFilter.handleConnect(TransportFilter.java:184)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.Filter.connect(Filter.java:80)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.Filter.connect(Filter.java:83)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.Filter.connect(Filter.java:83)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.ClientFilter.connect(ClientFilter.java:99)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.JdkClientContainer.connectSynchronously(JdkClientContainer.java:326)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.JdkClientContainer.access$700(JdkClientContainer.java:58)
              at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.JdkClientContainer$1.call(JdkClientContainer.java:156)
              ... 12 more
      

      I already tried to downgrade Agent Remoting to 4.6 but the same issue remains.

        Attachments

          Activity

            People

            Assignee:
            jthompson Jeff Thompson
            Reporter:
            felipecassiors Felipe Santos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: