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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • remoting

    Description

      A scheduled batch is attempting to start the slave agent with the following script:

      taskkill /f /im "EXCEL.exe"
      taskkill /f /im "ipy.exe"
      taskkill /f /im "jp2launcher.exe"

      javaws http://172.16.8.57:8080/computer/SSW73210/slave-agent.jnlp

      When the slave agent opens, it fails to do anything but the enclosed error. After rebooting, this issue fails to reproduce, but this seems dramatically more common when the slave is left on overnight.

      Attachments

        Activity

          sidjaiswal Siddhesh Jaiswal added a comment - - edited

          I am seeing something similar on a mac.
          Everything was working fine till 9/29/2015
          Now i am seeing a similar error.
          Tried deleting and creating the node again.

          Issue did not go away after reboot, every time i try to launch the slave agent i get the error.

          sidjaiswal Siddhesh Jaiswal added a comment - - edited I am seeing something similar on a mac. Everything was working fine till 9/29/2015 Now i am seeing a similar error. Tried deleting and creating the node again. Issue did not go away after reboot, every time i try to launch the slave agent i get the error.

          Issue got resolved after restarting the master agent

          sidjaiswal Siddhesh Jaiswal added a comment - Issue got resolved after restarting the master agent
          nqwang Neil Wang added a comment -

          I have got the same error. But this issue is not reproduced 100%.

          nqwang Neil Wang added a comment - I have got the same error. But this issue is not reproduced 100%.
          byahia Bilel Yahia added a comment -

          I do have the same problem. jenkins 2.19.4

          byahia Bilel Yahia added a comment - I do have the same problem. jenkins 2.19.4

          I ran into this issue after killing the java processes running the jenkins agent manually, and then trying to start them again. The issue I saw was the agent in Jenkins, had not disconnected, even though the processes were dead. Manually clicking the agent disclosure arrow, to make the menu pop up with "Disconnect Agent" in it, then manually disconnecting the agent, allowed me to successfully start the agent again. It seems that since the agent was already "running", Jenkins wasn't listening for a new connection to it.

          bedavisturbine Benjamin Davis added a comment - I ran into this issue after killing the java processes running the jenkins agent manually, and then trying to start them again. The issue I saw was the agent in Jenkins, had not disconnected, even though the processes were dead. Manually clicking the agent disclosure arrow, to make the menu pop up with "Disconnect Agent" in it, then manually disconnecting the agent, allowed me to successfully start the agent again. It seems that since the agent was already "running", Jenkins wasn't listening for a new connection to it.
          xwang2713 Xiaoming Wang added a comment -

          I get this more and more recently either during git submodule or cmake build. I tried 2.32, 2,38, 2.45 and 2.46. All the same.
          Redirect stdout/stderror of console may help a little. For the same Windows slave it run OK with old Jenkins, such as Jenkins 1.6.x

          xwang2713 Xiaoming Wang added a comment - I get this more and more recently either during git submodule or cmake build. I tried 2.32, 2,38, 2.45 and 2.46. All the same. Redirect stdout/stderror of console may help a little. For the same Windows slave it run OK with old Jenkins, such as Jenkins 1.6.x

          I get this even after upgrading to version 2.52. Restarting the master connects to windows jnlp agents for few hours and then see this error on slave home page:

          Restarting the windows service doesn't connect and throws "None of the protocols were accepted" error in .err file.

          java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:714) at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) at com.google.common.util.concurrent.ForwardingExecutorService.submit(ForwardingExecutorService.java:110) at jenkins.util.InterceptingExecutorService.submit(InterceptingExecutorService.java:49) at hudson.remoting.SingleLaneExecutorService.execute(SingleLaneExecutorService.java:105) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:595)

          Caused: java.io.IOException: Connection aborted: org.jenkinsci.remoting.nio.NioChannelHub$MonoNioTransport@65e5440d[name=Channel to /XX.XXX.XXX.XXX] at org.jenkinsci.remoting.nio.NioChannelHub$NioTransport.abort(NioChannelHub.java:210) at org.jenkinsci.remoting.nio.NioChannelHub.abortAll(NioChannelHub.java:686) at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:663) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

          ssandhu Sukhman Sandhu added a comment - I get this even after upgrading to version 2.52. Restarting the master connects to windows jnlp agents for few hours and then see this error on slave home page: Restarting the windows service doesn't connect and throws "None of the protocols were accepted" error in .err file. java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:714) at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) at com.google.common.util.concurrent.ForwardingExecutorService.submit(ForwardingExecutorService.java:110) at jenkins.util.InterceptingExecutorService.submit(InterceptingExecutorService.java:49) at hudson.remoting.SingleLaneExecutorService.execute(SingleLaneExecutorService.java:105) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:595) Caused: java.io.IOException: Connection aborted: org.jenkinsci.remoting.nio.NioChannelHub$MonoNioTransport@65e5440d [name=Channel to /XX.XXX.XXX.XXX] at org.jenkinsci.remoting.nio.NioChannelHub$NioTransport.abort(NioChannelHub.java:210) at org.jenkinsci.remoting.nio.NioChannelHub.abortAll(NioChannelHub.java:686) at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:663) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
          qris Chris Wilson added a comment -

          I had this error when there was a background jp2launcher process running, which stopped a new foreground process from starting, with this very confusing error message. Killing the background process solved the problem and allowed the foreground process to start normally again.

          qris Chris Wilson added a comment - I had this error when there was a background jp2launcher process running, which stopped a new foreground process from starting, with this very confusing error message. Killing the background process solved the problem and allowed the foreground process to start normally again.
          rubenns Ruben Coc added a comment -

          I have the same error . Did you found a solution?

          rubenns Ruben Coc added a comment - I have the same error . Did you found a solution?
          rohitbpatil27 Rohit Patil added a comment -

          Any updates on this?

          rohitbpatil27 Rohit Patil added a comment - Any updates on this?
          rubenns Ruben Coc added a comment -

          I try to reproduce this error and when i Launch agent from browser the agent start and it is ok for a while.

          The problem is the agent try to connect again over the current process and that make the above error to appear.

          Chris Wilson can you tell us when the background process appear because when I start the agent in background there is only one process jp2launcher.

          rubenns Ruben Coc added a comment - I try to reproduce this error and when i Launch agent from browser the agent start and it is ok for a while. The problem is the agent try to connect again over the current process and that make the above error to appear. Chris Wilson can you tell us when the background process appear because when I start the agent in background there is only one process jp2launcher.
          qris Chris Wilson added a comment -

          The background process was set up by our IT team, I think it ran the Jenkins agent as a service. It had no visible GUI, no way to know that it was running except for Task Manager (and presumably the Services MMC, although I didn't try that).

          qris Chris Wilson added a comment - The background process was set up by our IT team, I think it ran the Jenkins agent as a service. It had no visible GUI, no way to know that it was running except for Task Manager (and presumably the Services MMC, although I didn't try that).
          oleg_nenashev Oleg Nenashev added a comment -

          I doubt the issue is in progress. The component is also wrong from what I see, just noticed it in "recent updates". 

          I am moving it to the "remoting" component for now. In order to diagnose the issue, I need somebody to provide Support bundle (see https://wiki.jenkins.io/display/JENKINS/Support+Core+Plugin) and also logs from agent side.

          oleg_nenashev Oleg Nenashev added a comment - I doubt the issue is in progress. The component is also wrong from what I see, just noticed it in "recent updates".  I am moving it to the "remoting" component for now. In order to diagnose the issue, I need somebody to provide Support bundle (see https://wiki.jenkins.io/display/JENKINS/Support+Core+Plugin ) and also logs from agent side.
          splatteredbits Aaron Jensen added a comment -

          We were getting this error because our instance of Jenkins is served via HTTPS (no HTTP allowed). For some reason, default Java 1.8 can't connect. We had to download and install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files and install its .jar files into $JAVA_HOME\lib\security. Once those files were in place, the agent was able to connect.

          splatteredbits Aaron Jensen added a comment - We were getting this error because our instance of Jenkins is served via HTTPS (no HTTP allowed). For some reason, default Java 1.8 can't connect. We had to download and install the  Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files and install its .jar files into $JAVA_HOME\lib\security . Once those files were in place, the agent was able to connect.
          estamand Eric St-Amand added a comment - - edited

          Using Jenkins 2.107.1

          I have this error this morning, not sure why exactly, but I checked for those JCE and they were already bundled with java 1.8u151 64 bits.  Didn't help to use the one downloaded from Oracle.  I found a temporary solution by reverting to JNLP protocol v3 (in Configure Global Security / Agents section / Agent protocols... button), which I do not like because it is a deprecated protocol.  Using fixed port for JNLP connection.

          EDIT: Also tried to update to java 1.8u171 64 bits, no luck.

          estamand Eric St-Amand added a comment - - edited Using Jenkins 2.107.1 I have this error this morning, not sure why exactly, but I checked for those JCE and they were already bundled with java 1.8u151 64 bits.  Didn't help to use the one downloaded from Oracle.  I found a temporary solution by reverting to JNLP protocol v3 (in Configure Global Security / Agents section / Agent protocols... button), which I do not like because it is a deprecated protocol.  Using fixed port for JNLP connection. EDIT: Also tried to update to java 1.8u171 64 bits, no luck.
          junior1024 Peter Sosnowski added a comment - - edited

          Jenkins: 2.120

          I have the this issue happening on all my slaves.  This started once i configured Jenkins to work over HTTPS (HTTP disabled).   This is happening regardless whether configured to run over HTTP or HTTPS

          All Java Web Start Agent protocols disabled except for protocol/4.

          By launching jenkins slave manually via javaws, I can see no issues and the slaves connect, however when I install it as a windows service that's where the issue appears.

           

          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:296)
              at hudson.remoting.Engine.run(Engine.java:267)

          EDIT (UPDATE): I was able to fix my issue.  When I upgraded jenkins to version 2+ I never cleared the working dir of the slaves (so all the files including jenkins-slave.xml, jenkins-slave.exe, etc remained.)  After deleting the all the contents, I installed the jenkins slave as a windows service again and I no longer get the error, the slave connects as expected

          junior1024 Peter Sosnowski added a comment - - edited Jenkins: 2.120 I have the this issue happening on all my slaves.  This started once i configured Jenkins to work over HTTPS (HTTP disabled).    This is happening regardless whether configured to run over HTTP or HTTPS All Java Web Start Agent protocols disabled except for protocol/4. By launching jenkins slave manually via javaws, I can see no issues and the slaves connect, however when I install it as a windows service that's where the issue appears.   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:296)     at hudson.remoting.Engine.run(Engine.java:267) EDIT (UPDATE): I was able to fix my issue.  When I upgraded jenkins to version 2+ I never cleared the working dir of the slaves (so all the files including jenkins-slave.xml, jenkins-slave.exe, etc remained.)  After deleting the all the contents, I installed the jenkins slave as a windows service again and I no longer get the error, the slave connects as expected
          yuvakumar Yuva Kumar added a comment -

          Getting the above error while launching jar file from slave machine. Its Windows 10 device. 

          yuvakumar Yuva Kumar added a comment - Getting the above error while launching jar file from slave machine. Its Windows 10 device. 
          praveen_gupta PRAVEEN GUPTA added a comment - - edited

          I am also facing same issue when I upgraded to the latest LTS Jenkins version. But even after getting back to 2 older versions the slaves are not able to connect using any JNLP protocols even JNLP 1/2/3 doesn't work. Even after successful discovery of agent, it cant connect. 

          praveen_gupta PRAVEEN GUPTA added a comment - - edited I am also facing same issue when I upgraded to the latest LTS Jenkins version. But even after getting back to 2 older versions the slaves are not able to connect using any JNLP protocols even JNLP 1/2/3 doesn't work. Even after successful discovery of agent, it cant connect. 
          tapsa Tapio Reijonen added a comment - - edited

          We are also facing same issue when we upgraded to the LTS Jenkins ver. 2.89.4 version from version 2.73.3, where this was working as excepted. 

          This will failed (via windows command prompt or via browser):

          javaws slave-agent.jnlp
          

          javaws_4448_7882245671431844762.log

          With same windows host, this work as expected:

          java -jar agent.jar -jnlpUrl https://xxx/slave-agent.jnlp -secret yyyy
          

          Almost all jnlp protocols (not Jenkins CLI Protocol/1) are enabled from the master configuration.

          All plugins are 'up to date'

          java version "1.8.0_171"

          tapsa Tapio Reijonen added a comment - - edited We are also facing same issue when we upgraded to the LTS Jenkins ver. 2.89.4 version from version 2.73.3, where this was working as excepted.  This will failed (via windows command prompt or via browser): javaws slave-agent.jnlp javaws_4448_7882245671431844762.log With same windows host, this work as expected: java -jar agent.jar -jnlpUrl https: //xxx/slave-agent.jnlp -secret yyyy Almost all jnlp protocols (not Jenkins CLI Protocol/1) are enabled from the master configuration. All plugins are 'up to date' java version "1.8.0_171"

          I also faced this issue and was able to fix it, maybe? It happened that a same agent was running on a different VM. I closed it, tried to reconnect and no error message anymore.

          prodigio Frederik Meyer added a comment - I also faced this issue and was able to fix it, maybe? It happened that a same agent was running on a different VM. I closed it, tried to reconnect and no error message anymore.
          sbc8112 Dan Wang added a comment - - edited

          I also faced this issue after I update the jenkins to newest version but now is resolved.

           

          I follow junior1024 's last update solution, and works now.

          1. Remove slave workspace directory
          2. Download the launcher (slave-agent.jnlp) on your jenkins slave page.
          3. Use task-scheduler to process slave-agent.
          4. Enjoy it!

           

           

          sbc8112 Dan Wang added a comment - - edited I also faced this issue after I update the jenkins to newest version but now is resolved.   I follow junior1024 's last update solution, and works now. Remove slave workspace directory Download the launcher (slave-agent.jnlp) on your jenkins slave page. Use task-scheduler to process slave-agent. Enjoy it!    

          Check if JNLP setting is enabled in security configuration i.e.

          JENKINS_URL:PORT/configureSecurity/

          vtripathi1202 Vaibhav Mani Tripathi added a comment - Check if JNLP setting is enabled in security configuration i.e. JENKINS_URL:PORT/configureSecurity/

          I get a replay of this problem on Jenkins ver. 2.164.2, the above mentioned setup checked. Agent log with error:

          INFO: Trying protocol: JNLP4-connect
          июл 15, 2019 8:01:46 AM 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(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
          at java.lang.Thread.run(Unknown Source)июл 15, 2019 8:01:46 AM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connecting to jenkins:8081
          июл 15, 2019 8:01:46 AM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Server reports protocol JNLP4-plaintext not supported, skipping
          июл 15, 2019 8:01:46 AM hudson.remoting.jnlp.Main$CuiListener status
          

           

          vnenashev Владислав Ненашев added a comment - I get a replay of this problem on Jenkins ver. 2.164.2 , the above mentioned setup checked. Agent log with error: INFO: Trying protocol: JNLP4-connect июл 15, 2019 8:01:46 AM 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(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93) at java.lang. Thread .run(Unknown Source)июл 15, 2019 8:01:46 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Connecting to jenkins:8081 июл 15, 2019 8:01:46 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Server reports protocol JNLP4-plaintext not supported, skipping июл 15, 2019 8:01:46 AM hudson.remoting.jnlp.Main$CuiListener status  
          tiendungitd Dennis Tran added a comment -

          I'm facing a same issue in Jenkins 2.164.2, slave is windows 10 1809, java 18.0.221. I tried to clear slave workspace directory and download new launcher as sbc8112 suggest, but no luck, this problem still occur.  However, I do not understand the point "3. Use task-scheduler to process slave-agent", can you explain more detail how to do that, sbc8112.

          Thanks.

           

          tiendungitd Dennis Tran added a comment - I'm facing a same issue in Jenkins 2.164.2, slave is windows 10 1809, java 18.0.221. I tried to clear slave workspace directory and download new launcher as sbc8112 suggest, but no luck, this problem still occur.  However, I do not understand the point "3. Use task-scheduler to process slave-agent", can you explain more detail how to do that, sbc8112 . Thanks.  
          pausaca pau sabats added a comment -

          I reproduced this error on win10 removing the slave-agent.jnlp or having more than 1 of this files.

          The problem is that the slaves loses somehow the connection configuration to the master so this error is shown.

          My solution was to create a new agent slave, so a new .jnlp can be downloaded, and this one will be well configured so it will work.

          If the .jnlp doesn't show you in jenkins to download, you can try with the command : 

           
           

          pausaca pau sabats added a comment - I reproduced this error on win10 removing the slave-agent.jnlp or having more than 1 of this files. The problem is that the slaves loses somehow the connection configuration to the master so this error is shown. My solution was to create a new agent slave, so a new .jnlp can be downloaded, and this one will be well configured so it will work. If the .jnlp doesn't show you in jenkins to download, you can try with the command :  java -jar agent.jar -jnlpUrl http://jenkinsurl:port/computer/windows-agent/slave-agent.jnlp -secret xxxxxxxx -workDir "C:\JenkinsSlave"    
          jthompson Jeff Thompson added a comment -

          It looks like people are seeing a number of different issues, generally involving the same error message. Some people report success by tracking down a different machine running the same agent. Some find that some cleanup corrects the problem, though it's not clear just what cleanup is required. In some cases it probably involves a connection timeout and the server thinks an old instance of the agent is still connected.

          As Oleg said earlier, to get anywhere with this will require clear reproduction documentation and both agent and master logs. Information on whether it is specific to a certain type of platform or environment would also be important. I see some mention of different versions of Windows OSes but it's not clear if it's just a Windows issue and if it only occurs in some Windows environments or versions.

          jthompson Jeff Thompson added a comment - It looks like people are seeing a number of different issues, generally involving the same error message. Some people report success by tracking down a different machine running the same agent. Some find that some cleanup corrects the problem, though it's not clear just what cleanup is required. In some cases it probably involves a connection timeout and the server thinks an old instance of the agent is still connected. As Oleg said earlier, to get anywhere with this will require clear reproduction documentation and both agent and master logs. Information on whether it is specific to a certain type of platform or environment would also be important. I see some mention of different versions of Windows OSes but it's not clear if it's just a Windows issue and if it only occurs in some Windows environments or versions.

          FYI in case it helps any – I 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 with the same above failures/errors. 

          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.

          nneul Nathan Neulinger added a comment - FYI in case it helps any – I 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 with the same above failures/errors.  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.
          ssedhain S Sushil added a comment -

          Not sure if same issue, but the service is dying on a server 2012 node. It is set to restart and eventually it will connect but again die very frequently. Below is the slave error and slave-wrapper error logs:

          ********************************************** -slave error log - ***********************
          
          INFO: ConnectedJan 09, 2020 11:24:17 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: TerminatedJan 09, 2020 11:24:27 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Performing onReconnect operation.Jan 09, 2020 11:24:27 AM jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$FindEffectiveRestarters$1 onReconnectINFO: Restarting agent via jenkins.slaves.restarter.WinswSlaveRestarter@50c19504Jan 09, 2020 11:24:32 AM hudson.remoting.jnlp.Main createEngineINFO: Setting up agent: AutomationEdgeServerJan 09, 2020 11:24:32 AM hudson.remoting.jnlp.Main$CuiListener <init>INFO: Jenkins agent is running in headless mode.Jan 09, 2020 11:24:32 AM hudson.remoting.Engine startEngineINFO: Using Remoting version: 3.36Jan 09, 2020 11:24:32 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDirINFO: Using c:\jenkins\remoting as a remoting work directoryJan 09, 2020 11:24:32 AM org.jenkinsci.remoting.engine.WorkDirManager setupLoggingINFO: Both error and output logs will be printed to c:\jenkins\remotingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Locating server among [https://real-cicd.moonwalk.io/]Jan 09, 2020 11:24:33 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolveINFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Agent discovery successful  Agent address: real-cicd.moonwalk.io  Agent port:    70000  Identity:      31:49:15:6a:df:3b:70:76:81:cc:db:f2:c3:bc:57:68Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: HandshakingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Connecting to real-cicd.moonwalk.io:70000Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Trying protocol: JNLP4-connectJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Remote identity confirmed: 31:49:15:6a:df:3b:70:76:81:cc:db:f2:c3:bc:57:68Jan 09, 2020 11:24:33 AM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecvINFO: [JNLP4-connect connection to real-cicd.moonwalk.io/11.11.111.111:70000] Local headers refused by remote: AutomationEdgeServer is already connected to this master. Rejecting this connection.Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Protocol JNLP4-connect encountered an unexpected exceptionjava.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: AutomationEdgeServer is already connected to this master. Rejecting this connection. at org.jenkinsci.remoting.util.SettableFuture.get(SettableFuture.java:223) at hudson.remoting.Engine.innerRun(Engine.java:577) at hudson.remoting.Engine.run(Engine.java:488)Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: AutomationEdgeServer is already connected to this master. Rejecting this connection. at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.newAbortCause(ConnectionHeadersFilterLayer.java:378) at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.onRecvClosed(ConnectionHeadersFilterLayer.java:433) at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816) at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287) at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:172) at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816) 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.lambda$newThread$0(Engine.java:97) at java.lang.Thread.run(Unknown Source) Suppressed: java.nio.channels.ClosedChannelException ... 7 more
          Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Connecting to real-cicd.moonwalk.io:70000Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP4-plaintext not supported, skippingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP3-connect not supported, skippingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP2-connect not supported, skippingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP-connect not supported, skippingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener errorSEVERE: The server rejected the connection: None of the protocols were acceptedjava.lang.Exception: The server rejected the connection: None of the protocols were accepted at hudson.remoting.Engine.onConnectionRejected(Engine.java:662) at hudson.remoting.Engine.innerRun(Engine.java:602) at hudson.remoting.Engine.run(Engine.java:488)
          Jan 09, 2020 11:25:36 AM hudson.remoting.jnlp.Main createEngineINFO: Setting up agent: AutomationEdgeServerJan 09, 2020 11:25:36 AM hudson.remoting.jnlp.Main$CuiListener <init>INFO: Jenkins agent is running in headless mode.Jan 09, 2020 11:25:36 AM hudson.remoting.Engine startEngineINFO: Using Remoting version: 3.36Jan 09, 2020 11:25:36 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDirINFO: Using c:\jenkins\remoting as a remoting work directoryJan 09, 2020 11:25:36 AM org.jenkinsci.remoting.engine.WorkDirManager setupLoggingINFO: Both error and output logs will be printed to c:\jenkins\remotingJan 09, 2020 11:25:36 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Locating server among [https://real-cicd.moonwalk.io/]Jan 09, 2020 11:25:37 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolveINFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Agent discovery successful  Agent address: real-cicd.moonwalk.io  Agent port:    70000  Identity:      31:49:15:6a:df:3b:70:76:81:cc:db:f2:c3:bc:57:68Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: HandshakingJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Connecting to real-cicd.moonwalk.io:70000Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Trying protocol: JNLP4-connectJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Remote identity confirmed: 31:49:15:6a:df:3b:70:76:81:cc:db:f2:c3:bc:57:68Jan 09, 2020 11:25:37 AM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecvINFO: [JNLP4-connect connection to real-cicd.moonwalk.io/11.11.111.111:70000] Local headers refused by remote: AutomationEdgeServer is already connected to this master. Rejecting this connection.Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Protocol JNLP4-connect encountered an unexpected exceptionjava.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: AutomationEdgeServer is already connected to this master. Rejecting this connection. at org.jenkinsci.remoting.util.SettableFuture.get(SettableFuture.java:223) at hudson.remoting.Engine.innerRun(Engine.java:577) at hudson.remoting.Engine.run(Engine.java:488)Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: AutomationEdgeServer is already connected to this master. Rejecting this connection. at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.newAbortCause(ConnectionHeadersFilterLayer.java:378) at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.onRecvClosed(ConnectionHeadersFilterLayer.java:433) at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816) at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287) at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:172) at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816) 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.lambda$newThread$0(Engine.java:97) at java.lang.Thread.run(Unknown Source) Suppressed: java.nio.channels.ClosedChannelException ... 7 more
          Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Connecting to real-cicd.moonwalk.io:70000Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP4-plaintext not supported, skippingJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP3-connect not supported, skippingJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP2-connect not supported, skippingJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP-connect not supported, skippingJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener errorSEVERE: The server rejected the connection: None of the protocols were acceptedjava.lang.Exception: The server rejected the connection: None of the protocols were accepted at hudson.remoting.Engine.onConnectionRejected(Engine.java:662) at hudson.remoting.Engine.innerRun(Engine.java:602) at hudson.remoting.Engine.run(Engine.java:488)
          
          
          ***********************Wrapper logs*******************
          020-01-09 10:49:05,867 DEBUG - User requested the status of the process with id 'jenkinsslave-c__jenkins'2020-01-09 10:49:05,872 DEBUG - Completed. Exit code is 02020-01-09 11:24:28,242 DEBUG - Starting ServiceWrapper in the CLI mode2020-01-09 11:24:28,523 INFO  - Restarting the service with id 'jenkinsslave-c__jenkins'2020-01-09 11:24:28,539 DEBUG - Completed. Exit code is 02020-01-09 11:24:28,836 DEBUG - Starting ServiceWrapper in the CLI mode2020-01-09 11:24:29,071 INFO  - Restarting the service with id 'jenkinsslave-c__jenkins'2020-01-09 11:24:29,101 INFO  - Stopping jenkinsslave-c__jenkins2020-01-09 11:24:29,101 DEBUG - ProcessKill 48482020-01-09 11:24:29,226 INFO  - Found child process: 3564 Name: conhost.exe2020-01-09 11:24:29,273 INFO  - Stopping process 35642020-01-09 11:24:29,273 INFO  - Send SIGINT 35642020-01-09 11:24:29,273 WARN  - SIGINT to 3564 failed - Killing as fallback2020-01-09 11:24:29,273 INFO  - Stopping process 48482020-01-09 11:24:29,273 INFO  - Send SIGINT 48482020-01-09 11:24:29,273 WARN  - SIGINT to 4848 failed - Killing as fallback2020-01-09 11:24:29,289 INFO  - Finished jenkinsslave-c__jenkins2020-01-09 11:24:29,289 DEBUG - Completed. Exit code is 02020-01-09 11:24:30,476 INFO  - Starting ServiceWrapper in the service mode2020-01-09 11:24:30,523 DEBUG - Completed. Exit code is 02020-01-09 11:24:30,554 INFO  - Downloading: https://real-cicd.moonwalk.io/jnlpJars/slave.jar to C:\jenkins\slave.jar. failOnError=False2020-01-09 11:24:31,211 INFO  - Starting C:\Program Files\Java\jre1.8.0_231\bin\java.exe -Xrs  -jar "C:\jenkins\slave.jar" -jnlpUrl https://real-cicd.moonwalk.io/computer/AutomationEdgeServer/slave-agent.jnlp -secret 65e13a6191d47de3754d8f57cb56ba4f9ab199daeac2ccd161cd74050fd2e1cb2020-01-09 11:24:31,226 INFO  - Extension loaded: killOnStartup2020-01-09 11:24:31,242 DEBUG - Checking the potentially runaway process with PID=48482020-01-09 11:24:31,242 DEBUG - No runaway process with PID=4848. The process has been already stopped.2020-01-09 11:24:31,273 INFO  - Started process 44122020-01-09 11:24:31,289 DEBUG - Forwarding logs of the process System.Diagnostics.Process (java) to winsw.SizeBasedRollingLogAppender2020-01-09 11:24:31,320 INFO  - Recording PID of the started process:4412. PID file destination is C:\jenkins\jenkins_agent.pid2020-01-09 11:25:34,657 INFO  - Starting ServiceWrapper in the service mode2020-01-09 11:25:34,688 INFO  - Downloading: https://real-cicd.moonwalk.io/jnlpJars/slave.jar to C:\jenkins\slave.jar. failOnError=False2020-01-09 11:25:35,422 INFO  - Starting C:\Program Files\Java\jre1.8.0_231\bin\java.exe -Xrs  -jar "C:\jenkins\slave.jar" -jnlpUrl https://real-cicd.moonwalk.io/computer/AutomationEdgeServer/slave-agent.jnlp -secret 65e13a6191d47de3754d8f57cb56ba4f9ab199daeac2ccd161cd74050fd2e1cb2020-01-09 11:25:35,438 INFO  - Extension loaded: killOnStartup2020-01-09 11:25:35,438 DEBUG - Checking the potentially runaway process with PID=44122020-01-09 11:25:35,453 DEBUG - No runaway process with PID=4412. The process has been already stopped.2020-01-09 11:25:35,485 INFO  - Started process 32042020-01-09 11:25:35,485 DEBUG - Forwarding logs of the process System.Diagnostics.Process (java) to winsw.SizeBasedRollingLogAppender2020-01-09 11:25:35,516 INFO  - Recording PID of the started process:3204. PID file destination is C:\jenkins\jenkins_agent.pid2020-01-09 11:26:38,647 INFO  - Starting ServiceWrapper in the service mode2020-01-09 11:26:38,710 INFO  - Downloading: https://real-cicd.moonwalk.io/jnlpJars/slave.jar to C:\jenkins\slave.jar. failOnError=False2020-01-09 11:26:39,475 INFO  - Starting C:\Program Files\Java\jre1.8.0_231\bin\java.exe -Xrs  -jar "C:\jenkins\slave.jar" -jnlpUrl https://real-cicd.moonwalk.io/computer/AutomationEdgeServer/slave-agent.jnlp -secret 65e13a6191d47de3754d8f57cb56ba4f9ab199daeac2ccd161cd74050fd2e1cb2020-01-09 11:26:39,491 INFO  - Extension loaded: killOnStartup2020-01-09 11:26:39,491 DEBUG - Checking the potentially runaway process with PID=32042020-01-09 11:26:39,506 DEBUG - No runaway process with PID=3204. The process has been already stopped.2020-01-09 11:26:39,538 INFO  - Started process 26042020-01-09 11:26:39,538 DEBUG - Forwarding logs of the process System.Diagnostics.Process (java) to winsw.SizeBasedRollingLogAppender2020-01-09 11:26:39,569 INFO  - Recording PID of the started process:2604. PID file destination is C:\jenkins\jenkins_agent.pid
          
          ssedhain S Sushil added a comment - Not sure if same issue, but the service is dying on a server 2012 node. It is set to restart and eventually it will connect but again die very frequently. Below is the slave error and slave-wrapper error logs: ********************************************** -slave error log - *********************** INFO: ConnectedJan 09, 2020 11:24:17 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: TerminatedJan 09, 2020 11:24:27 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Performing onReconnect operation.Jan 09, 2020 11:24:27 AM jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$FindEffectiveRestarters$1 onReconnectINFO: Restarting agent via jenkins.slaves.restarter.WinswSlaveRestarter@50c19504Jan 09, 2020 11:24:32 AM hudson.remoting.jnlp.Main createEngineINFO: Setting up agent: AutomationEdgeServerJan 09, 2020 11:24:32 AM hudson.remoting.jnlp.Main$CuiListener <init>INFO: Jenkins agent is running in headless mode.Jan 09, 2020 11:24:32 AM hudson.remoting.Engine startEngineINFO: Using Remoting version: 3.36Jan 09, 2020 11:24:32 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDirINFO: Using c:\jenkins\remoting as a remoting work directoryJan 09, 2020 11:24:32 AM org.jenkinsci.remoting.engine.WorkDirManager setupLoggingINFO: Both error and output logs will be printed to c:\jenkins\remotingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Locating server among [https: //real-cicd.moonwalk.io/]Jan 09, 2020 11:24:33 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolveINFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Agent discovery successful  Agent address: real-cicd.moonwalk.io  Agent port:    70000  Identity:      31:49:15:6a:df:3b:70:76:81:cc:db:f2:c3:bc:57:68Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: HandshakingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Connecting to real-cicd.moonwalk.io:70000Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Trying protocol: JNLP4-connectJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Remote identity confirmed: 31:49:15:6a:df:3b:70:76:81:cc:db:f2:c3:bc:57:68Jan 09, 2020 11:24:33 AM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecvINFO: [JNLP4-connect connection to real-cicd.moonwalk.io/11.11.111.111:70000] Local headers refused by remote: AutomationEdgeServer is already connected to this master. Rejecting this connection.Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Protocol JNLP4-connect encountered an unexpected exceptionjava.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: AutomationEdgeServer is already connected to this master. Rejecting this connection. at org.jenkinsci.remoting.util.SettableFuture.get(SettableFuture.java:223) at hudson.remoting.Engine.innerRun(Engine.java:577) at hudson.remoting.Engine.run(Engine.java:488)Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: AutomationEdgeServer is already connected to this master. Rejecting this connection. at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.newAbortCause(ConnectionHeadersFilterLayer.java:378) at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.onRecvClosed(ConnectionHeadersFilterLayer.java:433) at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816) at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287) at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:172) at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816) 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.lambda$newThread$0(Engine.java:97) at java.lang. Thread .run(Unknown Source) Suppressed: java.nio.channels.ClosedChannelException ... 7 more Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Connecting to real-cicd.moonwalk.io:70000Jan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP4-plaintext not supported, skippingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP3-connect not supported, skippingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP2-connect not supported, skippingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP-connect not supported, skippingJan 09, 2020 11:24:33 AM hudson.remoting.jnlp.Main$CuiListener errorSEVERE: The server rejected the connection: None of the protocols were acceptedjava.lang.Exception: The server rejected the connection: None of the protocols were accepted at hudson.remoting.Engine.onConnectionRejected(Engine.java:662) at hudson.remoting.Engine.innerRun(Engine.java:602) at hudson.remoting.Engine.run(Engine.java:488) Jan 09, 2020 11:25:36 AM hudson.remoting.jnlp.Main createEngineINFO: Setting up agent: AutomationEdgeServerJan 09, 2020 11:25:36 AM hudson.remoting.jnlp.Main$CuiListener <init>INFO: Jenkins agent is running in headless mode.Jan 09, 2020 11:25:36 AM hudson.remoting.Engine startEngineINFO: Using Remoting version: 3.36Jan 09, 2020 11:25:36 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDirINFO: Using c:\jenkins\remoting as a remoting work directoryJan 09, 2020 11:25:36 AM org.jenkinsci.remoting.engine.WorkDirManager setupLoggingINFO: Both error and output logs will be printed to c:\jenkins\remotingJan 09, 2020 11:25:36 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Locating server among [https: //real-cicd.moonwalk.io/]Jan 09, 2020 11:25:37 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolveINFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Agent discovery successful  Agent address: real-cicd.moonwalk.io  Agent port:    70000  Identity:      31:49:15:6a:df:3b:70:76:81:cc:db:f2:c3:bc:57:68Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: HandshakingJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Connecting to real-cicd.moonwalk.io:70000Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Trying protocol: JNLP4-connectJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Remote identity confirmed: 31:49:15:6a:df:3b:70:76:81:cc:db:f2:c3:bc:57:68Jan 09, 2020 11:25:37 AM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecvINFO: [JNLP4-connect connection to real-cicd.moonwalk.io/11.11.111.111:70000] Local headers refused by remote: AutomationEdgeServer is already connected to this master. Rejecting this connection.Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Protocol JNLP4-connect encountered an unexpected exceptionjava.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: AutomationEdgeServer is already connected to this master. Rejecting this connection. at org.jenkinsci.remoting.util.SettableFuture.get(SettableFuture.java:223) at hudson.remoting.Engine.innerRun(Engine.java:577) at hudson.remoting.Engine.run(Engine.java:488)Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: AutomationEdgeServer is already connected to this master. Rejecting this connection. at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.newAbortCause(ConnectionHeadersFilterLayer.java:378) at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.onRecvClosed(ConnectionHeadersFilterLayer.java:433) at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816) at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287) at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:172) at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816) 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.lambda$newThread$0(Engine.java:97) at java.lang. Thread .run(Unknown Source) Suppressed: java.nio.channels.ClosedChannelException ... 7 more Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Connecting to real-cicd.moonwalk.io:70000Jan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP4-plaintext not supported, skippingJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP3-connect not supported, skippingJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP2-connect not supported, skippingJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Server reports protocol JNLP-connect not supported, skippingJan 09, 2020 11:25:37 AM hudson.remoting.jnlp.Main$CuiListener errorSEVERE: The server rejected the connection: None of the protocols were acceptedjava.lang.Exception: The server rejected the connection: None of the protocols were accepted at hudson.remoting.Engine.onConnectionRejected(Engine.java:662) at hudson.remoting.Engine.innerRun(Engine.java:602) at hudson.remoting.Engine.run(Engine.java:488) ***********************Wrapper logs******************* 020-01-09 10:49:05,867 DEBUG - User requested the status of the process with id 'jenkinsslave-c__jenkins' 2020-01-09 10:49:05,872 DEBUG - Completed. Exit code is 02020-01-09 11:24:28,242 DEBUG - Starting ServiceWrapper in the CLI mode2020-01-09 11:24:28,523 INFO  - Restarting the service with id 'jenkinsslave-c__jenkins' 2020-01-09 11:24:28,539 DEBUG - Completed. Exit code is 02020-01-09 11:24:28,836 DEBUG - Starting ServiceWrapper in the CLI mode2020-01-09 11:24:29,071 INFO  - Restarting the service with id 'jenkinsslave-c__jenkins' 2020-01-09 11:24:29,101 INFO  - Stopping jenkinsslave-c__jenkins2020-01-09 11:24:29,101 DEBUG - ProcessKill 48482020-01-09 11:24:29,226 INFO  - Found child process: 3564 Name: conhost.exe2020-01-09 11:24:29,273 INFO  - Stopping process 35642020-01-09 11:24:29,273 INFO  - Send SIGINT 35642020-01-09 11:24:29,273 WARN  - SIGINT to 3564 failed - Killing as fallback2020-01-09 11:24:29,273 INFO  - Stopping process 48482020-01-09 11:24:29,273 INFO  - Send SIGINT 48482020-01-09 11:24:29,273 WARN  - SIGINT to 4848 failed - Killing as fallback2020-01-09 11:24:29,289 INFO  - Finished jenkinsslave-c__jenkins2020-01-09 11:24:29,289 DEBUG - Completed. Exit code is 02020-01-09 11:24:30,476 INFO  - Starting ServiceWrapper in the service mode2020-01-09 11:24:30,523 DEBUG - Completed. Exit code is 02020-01-09 11:24:30,554 INFO  - Downloading: https: //real-cicd.moonwalk.io/jnlpJars/slave.jar to C:\jenkins\slave.jar. failOnError=False2020-01-09 11:24:31,211 INFO  - Starting C:\Program Files\Java\jre1.8.0_231\bin\java.exe -Xrs  -jar "C:\jenkins\slave.jar" -jnlpUrl https://real-cicd.moonwalk.io/computer/AutomationEdgeServer/slave-agent.jnlp -secret 65e13a6191d47de3754d8f57cb56ba4f9ab199daeac2ccd161cd74050fd2e1cb2020-01-09 11:24:31,226 INFO  - Extension loaded: killOnStartup2020-01-09 11:24:31,242 DEBUG - Checking the potentially runaway process with PID=48482020-01-09 11:24:31,242 DEBUG - No runaway process with PID=4848. The process has been already stopped.2020-01-09 11:24:31,273 INFO  - Started process 44122020-01-09 11:24:31,289 DEBUG - Forwarding logs of the process System .Diagnostics. Process (java) to winsw.SizeBasedRollingLogAppender2020-01-09 11:24:31,320 INFO  - Recording PID of the started process:4412. PID file destination is C:\jenkins\jenkins_agent.pid2020-01-09 11:25:34,657 INFO  - Starting ServiceWrapper in the service mode2020-01-09 11:25:34,688 INFO  - Downloading: https://real-cicd.moonwalk.io/jnlpJars/slave.jar to C:\jenkins\slave.jar. failOnError=False2020-01-09 11:25:35,422 INFO  - Starting C:\Program Files\Java\jre1.8.0_231\bin\java.exe -Xrs  -jar "C:\jenkins\slave.jar" -jnlpUrl https://real-cicd.moonwalk.io/computer/AutomationEdgeServer/slave-agent.jnlp -secret 65e13a6191d47de3754d8f57cb56ba4f9ab199daeac2ccd161cd74050fd2e1cb2020-01-09 11:25:35,438 INFO  - Extension loaded: killOnStartup2020-01-09 11:25:35,438 DEBUG - Checking the potentially runaway process with PID=44122020-01-09 11:25:35,453 DEBUG - No runaway process with PID=4412. The process has been already stopped.2020-01-09 11:25:35,485 INFO  - Started process 32042020-01-09 11:25:35,485 DEBUG - Forwarding logs of the process System .Diagnostics. Process (java) to winsw.SizeBasedRollingLogAppender2020-01-09 11:25:35,516 INFO  - Recording PID of the started process:3204. PID file destination is C:\jenkins\jenkins_agent.pid2020-01-09 11:26:38,647 INFO  - Starting ServiceWrapper in the service mode2020-01-09 11:26:38,710 INFO  - Downloading: https://real-cicd.moonwalk.io/jnlpJars/slave.jar to C:\jenkins\slave.jar. failOnError=False2020-01-09 11:26:39,475 INFO  - Starting C:\Program Files\Java\jre1.8.0_231\bin\java.exe -Xrs  -jar "C:\jenkins\slave.jar" -jnlpUrl https://real-cicd.moonwalk.io/computer/AutomationEdgeServer/slave-agent.jnlp -secret 65e13a6191d47de3754d8f57cb56ba4f9ab199daeac2ccd161cd74050fd2e1cb2020-01-09 11:26:39,491 INFO  - Extension loaded: killOnStartup2020-01-09 11:26:39,491 DEBUG - Checking the potentially runaway process with PID=32042020-01-09 11:26:39,506 DEBUG - No runaway process with PID=3204. The process has been already stopped.2020-01-09 11:26:39,538 INFO  - Started process 26042020-01-09 11:26:39,538 DEBUG - Forwarding logs of the process System .Diagnostics. Process (java) to winsw.SizeBasedRollingLogAppender2020-01-09 11:26:39,569 INFO  - Recording PID of the started process:2604. PID file destination is C:\jenkins\jenkins_agent.pid
          bingchuan bingchuan sun added a comment - - edited

           I have the same problem. After change org.jenkinsci.remoting.protocol.ProtocolStack#handshakingTimeout to more then 20s,then it connected. My conclusion is that the connect will take more then 10s sometimes based on the network driver,but the default 'final ' value is 10s , so it will timeout and closed.

           

          The final reason is java.net.InetSocketAddress#getHostName invoked by org.jenkinsci.remoting.engine.JnlpProtocol4Handler#createSSLEngine blocked so much time.

          bingchuan bingchuan sun added a comment - - edited  I have the same problem. After change org.jenkinsci.remoting.protocol.ProtocolStack#handshakingTimeout to more then 20s,then it connected. My conclusion is that the connect will take more then 10s sometimes based on the network driver,but the default 'final ' value is 10s , so it will timeout and closed.   The final reason is java.net.InetSocketAddress#getHostName invoked by org.jenkinsci.remoting.engine.JnlpProtocol4Handler#createSSLEngine blocked so much time.

          People

            Unassigned Unassigned
            shortcipher Benjamin Wagner
            Votes:
            32 Vote for this issue
            Watchers:
            48 Start watching this issue

            Dates

              Created:
              Updated: