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

Windows Agent can't connect to Master through JNLP without Java Web Start Agent Protocol 3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Not A Defect
    • Labels:
      None
    • Environment:
      master machine: centos 7 jenkins version 2.73
      windows node: windows 10-64bt , java version "1.8.0_151"
    • Similar Issues:

      Description

      1.  In jenkins global configuration set  TCP port for JNLP agents as random

             Agent protocol :  select Java Web Start Agent Protocol/1 /2/4  and disable 3

      2. Create windows node and set launch mode as  Launch agent via Java Web Start

      3.  Go to windows machine , run command through java -jar slave.jar *****   which copied form agent configuration page. **

      it report following erros

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

      INFO: Trying protocol: JNLP4-connect
      Nov 28, 2017 4:35:41 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:590)
              at hudson.remoting.Engine.run(Engine.java:451)
      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.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:832)
              at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
              at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer.access$1500(BIONetworkLayer.java:48)
              at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader.run(BIONetworkLayer.java:247)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at hudson.remoting.Engine$1$1.run(Engine.java:98)
              at java.lang.Thread.run(Unknown Source)

      Nov 28, 2017 4:35:41 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connecting to webrtc-checkin.sh.intel.com:48840
      Nov 28, 2017 4:35:41 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Server reports protocol JNLP4-plaintext not supported, skipping
      Nov 28, 2017 4:35:41 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Server reports protocol JNLP3-connect not supported, skipping
      Nov 28, 2017 4:35:41 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Trying protocol: JNLP2-connect
      Nov 28, 2017 4:35:41 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Protocol JNLP2-connect encountered an unexpected exception
      java.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Server didn't accept the handshake:
              at java.util.concurrent.FutureTask.report(Unknown Source)
              at java.util.concurrent.FutureTask.get(Unknown Source)
              at hudson.remoting.Engine.innerRun(Engine.java:590)
              at hudson.remoting.Engine.run(Engine.java:451)
      Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Server didn't accept the handshake:
              at org.jenkinsci.remoting.engine.JnlpProtocol2Handler.sendHandshake(JnlpProtocol2Handler.java:134)
              at org.jenkinsci.remoting.engine.LegacyJnlpProtocolHandler$2.call(LegacyJnlpProtocolHandler.java:162)
              at org.jenkinsci.remoting.engine.LegacyJnlpProtocolHandler$2.call(LegacyJnlpProtocolHandler.java:158)
              at java.util.concurrent.FutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at hudson.remoting.Engine$1$1.run(Engine.java:98)
              at java.lang.Thread.run(Unknown Source)

      Nov 28, 2017 4:35:41 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connecting to webrtc-checkin.sh.intel.com:48840
      Nov 28, 2017 4:35:41 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Trying protocol: JNLP-connect
      Nov 28, 2017 4:35:41 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Protocol JNLP-connect encountered an unexpected exception
      java.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Server didn't accept the handshake:
              at java.util.concurrent.FutureTask.report(Unknown Source)
              at java.util.concurrent.FutureTask.get(Unknown Source)
              at hudson.remoting.Engine.innerRun(Engine.java:590)
              at hudson.remoting.Engine.run(Engine.java:451)
      Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Server didn't accept the handshake:
              at org.jenkinsci.remoting.engine.JnlpProtocol1Handler.sendHandshake(JnlpProtocol1Handler.java:121)
              at org.jenkinsci.remoting.engine.LegacyJnlpProtocolHandler$2.call(LegacyJnlpProtocolHandler.java:162)
              at org.jenkinsci.remoting.engine.LegacyJnlpProtocolHandler$2.call(LegacyJnlpProtocolHandler.java:158)
              at java.util.concurrent.FutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at hudson.remoting.Engine$1$1.run(Engine.java:98)
              at java.lang.Thread.run(Unknown Source)

      Nov 28, 2017 4:35:41 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:651)
              at hudson.remoting.Engine.innerRun(Engine.java:615)
              at hudson.remoting.Engine.run(Engine.java:451)

       

      4.  Back to global configuration and disable JNLP protocol 4 , keep 1 and 2.  Still can not connect to master

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          So, please attach the Master's system log. Usually it is called jenkins.log or so

          Show
          oleg_nenashev Oleg Nenashev added a comment - So, please attach the Master's system log. Usually it is called jenkins.log or so
          Hide
          alice_zh alice zhang added a comment -

          I didn't found any Master's jenkins log .  We used java -jar jenkins.war to start master jenkins.   No error logs were print at console command line  ,  there is also no related logs was found in system log folder /var/log/.   It seems slave didn't connect to master server.   

          Show
          alice_zh alice zhang added a comment - I didn't found any Master's jenkins log .  We used java -jar jenkins.war to start master jenkins.   No error logs were print at console command line  ,  there is also no related logs was found in system log folder /var/log/.   It seems slave didn't connect to master server.   
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Hard to say what happens then. Any chance your proxy somehow filters out the protocols? It maybe a case for 2-years old setup with enforced security, which may have been trying to filter out the unencrypted JNLP1/2

          Show
          oleg_nenashev Oleg Nenashev added a comment - Hard to say what happens then. Any chance your proxy somehow filters out the protocols? It maybe a case for 2-years old setup with enforced security, which may have been trying to filter out the unencrypted JNLP1/2
          Hide
          alice_zh alice zhang added a comment -

          Thanks Oleg.  We found the root causes, it because we set network proxy on Windows machine. Disable it, it works fine now. 

          Show
          alice_zh alice zhang added a comment - Thanks Oleg.  We found the root causes, it because we set network proxy on Windows machine. Disable it, it works fine now. 
          Hide
          alice_zh alice zhang added a comment -

          It because our network configuration issue .

          Show
          alice_zh alice zhang added a comment - It because our network configuration issue .

            People

            Assignee:
            oleg_nenashev Oleg Nenashev
            Reporter:
            alice_zh alice zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: