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

JNLP4 Connect Error - Connection closed before acknowledgement sent

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Not A Defect
    • Component/s: core, remoting
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      This seems very similar to a recently closed #57143. We have spent quite a bit of time troubleshooting it though not able to find the root case. We had nginx and replace that by elb and both cases leads to same problem below. Please let me know what additional logs/info are needed and will provide. Any help/support/guidance is appreciated.

      1. netcat from slave towards master. 

      $ nc -z jenkins.infrastructure.XXXXX.care 50000

      Connection to jenkins.infrastructure.XXXXX.care port 50000 [tcp/*] succeeded!

      #ELB

      kubectl -n infrastructure get svc
      infrastructure-nginx-ingress-internal-controller LoadBalancer 100.66.210.45 internal-ab39ee254472111e9aa5b0a4f0f93d47-951468028.us-east-1.elb.amazonaws.com 80:30664/TCP,443:30937/TCP,50000:32123/TCP 166d

      1. Logs

      Aug 31, 2019 7:39:48 PM hudson.remoting.jnlp.Main createEngine

      INFO: Setting up agent: ICL-Slave

      Aug 31, 2019 7:39:48 PM hudson.remoting.jnlp.Main$CuiListener <init>

      INFO: Jenkins agent is running in headless mode.

      Aug 31, 2019 7:39:48 PM hudson.remoting.Engine startEngine

      INFO: Using Remoting version: 3.29

      Aug 31, 2019 7:39:48 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir

      INFO: Using /Users/vmccbuild/jenkins/remoting as a remoting work directory

      Aug 31, 2019 7:39:48 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Locating server among https://jenkins.infrastructure.xxxxx.care/

      Aug 31, 2019 7:39:48 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve

      INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]

      Aug 31, 2019 7:39:48 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Agent discovery successful

        Agent address: jenkins.infrastructure.xxxxx.care

        Agent port:    50000

        Identity:      6b:c4:c2:2b:ed:b7:da:bc:72:58:c8:83:dd:d0:67:46

      Aug 31, 2019 7:39:48 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Handshaking

      Aug 31, 2019 7:39:48 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Connecting to jenkins.infrastructure.xxxxx.care:50000

      Aug 31, 2019 7:39:49 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Trying protocol: JNLP4-connect

      Aug 31, 2019 7:39:59 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Protocol JNLP4-connect encountered an unexpected exception

      java.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Connection closed before acknowledgement sent

      at org.jenkinsci.remoting.util.SettableFuture.get(SettableFuture.java:223)

      at hudson.remoting.Engine.innerRun(Engine.java:614)

      at hudson.remoting.Engine.run(Engine.java:474)

      Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Connection closed before acknowledgement sent

      at org.jenkinsci.remoting.protocol.impl.AckFilterLayer.onRecvClosed(AckFilterLayer.java:280)

      at org.jenkinsci.remoting.protocol.FilterLayer.abort(FilterLayer.java:164)

      at org.jenkinsci.remoting.protocol.impl.AckFilterLayer.access$000(AckFilterLayer.java:43)

      at org.jenkinsci.remoting.protocol.impl.AckFilterLayer$1.run(AckFilterLayer.java:176)

      at org.jenkinsci.remoting.protocol.IOHub$DelayedRunnable.run(IOHub.java:964)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

      at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)

      at java.lang.Thread.run(Thread.java:748)

       

      Aug 31, 2019 7:39:59 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Connecting to jenkins.infrastructure.xxxxx.care:50000

      Aug 31, 2019 7:39:59 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Server reports protocol JNLP4-plaintext not supported, skipping

      Aug 31, 2019 7:39:59 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Server reports protocol JNLP3-connect not supported, skipping

      Aug 31, 2019 7:39:59 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Server reports protocol JNLP2-connect not supported, skipping

      Aug 31, 2019 7:39:59 PM hudson.remoting.jnlp.Main$CuiListener status

      INFO: Server reports protocol JNLP-connect not supported, skipping

      Aug 31, 2019 7:39:59 PM hudson.remoting.jnlp.Main$CuiListener error

      SEVERE: The server rejected the connection: None of the protocols were accepted

      java.lang.Exception: The server rejected the connection: None of the protocols were accepted

      at hudson.remoting.Engine.onConnectionRejected(Engine.java:682)

      at hudson.remoting.Engine.innerRun(Engine.java:639)

      at hudson.remoting.Engine.run(Engine.java:474)

        Attachments

          Activity

          Hide
          peppe1977 Pedro Salomao added a comment -

          Solution to this problem: tunnel through the ELB as to get slave/master connected. How to do this?

          Go to Jenkins Master → Nodes → → Advanced → Tunnel: ernal-aef67c013ca2d11e9b6ab02485d01370-111334679.us-west-1.elb.amazonaws.com:50000 (Above takes for granted that security group/inbound has also been properly configured)

          This assumes that you have already configured agent port static to 50000 - how? Jenkins -> global security -> Agents -> TCP port for inbound agents -> Fixed: 50000

          Show
          peppe1977 Pedro Salomao added a comment - Solution to this problem: tunnel through the ELB as to get slave/master connected. How to do this? Go to Jenkins Master → Nodes → → Advanced → Tunnel: ernal-aef67c013ca2d11e9b6ab02485d01370-111334679.us-west-1.elb.amazonaws.com:50000 (Above takes for granted that security group/inbound has also been properly configured) This assumes that you have already configured agent port static to 50000 - how? Jenkins -> global security -> Agents -> TCP port for inbound agents -> Fixed: 50000
          Hide
          nneul Nathan Neulinger added a comment -

          I realize this has already been closed - but just had to go through a big diag effort on my site with a bunch of windows JNLP agents that stopped working sometime in past few days.

          After a long set of rabbit trails - what I found in my case – the problem wound up being reverse DNS resolution stopped working (unrelated local problem – "It's always DNS", right?) - but that inability to reverse resolve the connecting client (windows box) was causing the JNLP server side to drop the connection. 

          Just wanted to add this here in case it helps anyone else with future similar issues if it happens to be related.

          Show
          nneul Nathan Neulinger added a comment - I realize this has already been closed - but just had to go through a big diag effort on my site with a bunch of windows JNLP agents that stopped working sometime in past few days. After a long set of rabbit trails - what I found in my case – the problem wound up being reverse DNS resolution stopped working (unrelated local problem – "It's always DNS", right?) - but that inability to reverse resolve the connecting client (windows box) was causing the JNLP server side to drop the connection.  Just wanted to add this here in case it helps anyone else with future similar issues if it happens to be related.

            People

            • Assignee:
              Unassigned
              Reporter:
              peppe1977 Pedro Salomao
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: