• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • ssh-agent-plugin
    • Jenkins 2.46.2
      Slave.jar version: 3.7
      SSH Agent plugin 1.15

      Randomly getting Agent diconnect with this output:

       java.nio.channels.ClosedChannelException 19:33:02 at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
      19:33:02 at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:179)
      19:33:02 at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:721)
      19:33:02 at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      19:33:02 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      19:33:02 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      19:33:02 at java.lang.Thread.run(Unknown Source)
      19:33:02 Caused: java.io.IOException: Backing channel 'JNLP4-connect connection from wr2czc42446kf.jdnet.deere.com/172.23.213.39:59664' is disconnected.
      19:33:02 at hudson.remoting.RemoteInvocationHandler.channelOrFail(RemoteInvocationHandler.java:192)
      19:33:02 at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:257)
      19:33:02 at com.sun.proxy.$Proxy74.isAlive(Unknown Source)
      19:33:02 at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1043)
      19:33:02 at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:1035)
      19:33:02 at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:155)
      19:33:02 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
      19:33:02 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
      19:33:02 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      19:33:02 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      19:33:02 at hudson.model.Build$BuildExecution.build(Build.java:206)
      19:33:02 at hudson.model.Build$BuildExecution.doRun(Build.java:163)
      19:33:02 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      19:33:02 at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136)
      19:33:02 at hudson.model.Run.execute(Run.java:1728)
      19:33:02 at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73)
      19:33:02 at hudson.model.ResourceController.execute(ResourceController.java:98)
      19:33:02 at hudson.model.Executor.run(Executor.java:405)

          [JENKINS-44132] Random JNLP Agent disconnect

          Jens Fiedelak created issue -

          rr lai added a comment - - edited

          We saw the same issue happening randomly on aws ec2 spot instances after upgrading to jenkins 2.46.2

          [8:33 PM]
          ```20:27:29 FATAL: command execution failed
          20:27:29 java.nio.channels.ClosedChannelException
          20:27:29 at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onReadClosed(ChannelApplicationLayer.java:208)
          20:27:29 at org.jenkinsci.remoting.protocol.ApplicationLayer.onRecvClosed(ApplicationLayer.java:222)
          20:27:29 at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:832)
          20:27:29 at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287)
          20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:181)
          20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.switchToNoSecure(SSLEngineFilterLayer.java:283)
          20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processWrite(SSLEngineFilterLayer.java:503)
          20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processQueuedWrites(SSLEngineFilterLayer.java:248)
          20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doSend(SSLEngineFilterLayer.java:200)
          20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doCloseSend(SSLEngineFilterLayer.java:213)
          20:27:29 at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.doCloseSend(ProtocolStack.java:800)
          20:27:29 at org.jenkinsci.remoting.protocol.ApplicationLayer.doCloseWrite(ApplicationLayer.java:173)
          20:27:29 at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer$ByteBufferCommandTransport.closeWrite(ChannelApplicationLayer.java:311)
          20:27:29 at hudson.remoting.Channel.close(Channel.java:1295)
          20:27:29 at hudson.remoting.Channel.close(Channel.java:1263)
          20:27:29 at hudson.slaves.SlaveComputer.closeChannel(SlaveComputer.java:704)
          20:27:29 at hudson.slaves.SlaveComputer.access$800(SlaveComputer.java:96)
          20:27:29 at hudson.slaves.SlaveComputer$3.run(SlaveComputer.java:626)
          20:27:29 at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
          20:27:29 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          20:27:29 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          20:27:29 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          20:27:29 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          20:27:29 at java.lang.Thread.run(Thread.java:745)
          20:27:29 Caused: java.io.IOException: Backing channel 'JNLP4-connect connection from 10.192.10.65/10.192.10.65:40927' is disconnected.
          20:27:29 at hudson.remoting.RemoteInvocationHandler.channelOrFail(RemoteInvocationHandler.java:192)
          20:27:29 at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:257)
          20:27:29 at com.sun.proxy.$Proxy76.isAlive(Unknown Source)
          20:27:29 at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1043)
          20:27:29 at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:1035)
          20:27:29 at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:155)```

          rr lai added a comment - - edited We saw the same issue happening randomly on aws ec2 spot instances after upgrading to jenkins 2.46.2 [8:33 PM] ```20:27:29 FATAL: command execution failed 20:27:29 java.nio.channels.ClosedChannelException 20:27:29 at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onReadClosed(ChannelApplicationLayer.java:208) 20:27:29 at org.jenkinsci.remoting.protocol.ApplicationLayer.onRecvClosed(ApplicationLayer.java:222) 20:27:29 at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:832) 20:27:29 at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287) 20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:181) 20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.switchToNoSecure(SSLEngineFilterLayer.java:283) 20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processWrite(SSLEngineFilterLayer.java:503) 20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processQueuedWrites(SSLEngineFilterLayer.java:248) 20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doSend(SSLEngineFilterLayer.java:200) 20:27:29 at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doCloseSend(SSLEngineFilterLayer.java:213) 20:27:29 at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.doCloseSend(ProtocolStack.java:800) 20:27:29 at org.jenkinsci.remoting.protocol.ApplicationLayer.doCloseWrite(ApplicationLayer.java:173) 20:27:29 at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer$ByteBufferCommandTransport.closeWrite(ChannelApplicationLayer.java:311) 20:27:29 at hudson.remoting.Channel.close(Channel.java:1295) 20:27:29 at hudson.remoting.Channel.close(Channel.java:1263) 20:27:29 at hudson.slaves.SlaveComputer.closeChannel(SlaveComputer.java:704) 20:27:29 at hudson.slaves.SlaveComputer.access$800(SlaveComputer.java:96) 20:27:29 at hudson.slaves.SlaveComputer$3.run(SlaveComputer.java:626) 20:27:29 at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) 20:27:29 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 20:27:29 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 20:27:29 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 20:27:29 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 20:27:29 at java.lang.Thread.run(Thread.java:745) 20:27:29 Caused: java.io.IOException: Backing channel 'JNLP4-connect connection from 10.192.10.65/10.192.10.65:40927' is disconnected. 20:27:29 at hudson.remoting.RemoteInvocationHandler.channelOrFail(RemoteInvocationHandler.java:192) 20:27:29 at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:257) 20:27:29 at com.sun.proxy.$Proxy76.isAlive(Unknown Source) 20:27:29 at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1043) 20:27:29 at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:1035) 20:27:29 at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:155)```
          Ausias Armesto made changes -
          Rank New: Ranked higher

          Robb Kistler added a comment -

          I'm seeing the same problem with JNLP connected agents, but only if the build job is quiet.  If there is console output, everything is fine.  jenkins 2.46.3

          Robb Kistler added a comment - I'm seeing the same problem with JNLP connected agents, but only if the build job is quiet.  If there is console output, everything is fine.  jenkins 2.46.3

          Mikhail Chinkov added a comment - - edited

          I have the same issue with my Mac OS X slaves on Jenkins 2.60.2.

          Mikhail Chinkov added a comment - - edited I have the same issue with my Mac OS X slaves on Jenkins 2.60.2.

          Also reproduced on Jenkins 2.73.1 with JNLP agent 3.10 version 

           

          sheeran Dambri added a comment - Also reproduced on Jenkins 2.73.1 with JNLP agent 3.10 version   

          Christian H added a comment -

          For me this also occurs in Jenkins 2.73.2

          Christian H added a comment - For me this also occurs in Jenkins 2.73.2

          Hello here are my findings against this error/stack trace that I used to experiment :

           

          https://stackoverflow.com/questions/45433225/jenkins-windows-slave-connection-getting-terminated-with-java-nio-channels-close/46521585#46521585

          "

          I experienced the same issue. I found out that the windows slave switched to a "sleep" mode specially if your jobs are not running against a GUI.

          • For windows... no move of the mouse or keyboard means no activity.

          Then to successfully solve it. On a Windows7 slave, here is what I did:

          • Control Panel\Hardware and Sound\Power Options
          • Show additionnal plans
          • select High performance
          • Control Panel\Hardware and Sound\Power Options\Edit Plan Settings
          • turn off display never
          • Change advanced power settings -->turn off hard disk after 10000 min

          Should be ok after this procedure"

          sheeran Dambri added a comment - Hello here are my findings against this error/stack trace that I used to experiment :   https://stackoverflow.com/questions/45433225/jenkins-windows-slave-connection-getting-terminated-with-java-nio-channels-close/46521585#46521585 " I experienced the same issue. I found out that the windows slave switched to a "sleep" mode specially if your jobs are not running against a GUI. For windows... no move of the mouse or keyboard means no activity. Then to successfully solve it. On a Windows7 slave, here is what I did: Control Panel\Hardware and Sound\Power Options Show additionnal plans select High performance Control Panel\Hardware and Sound\Power Options\Edit Plan Settings turn off display never Change advanced power settings -->turn off hard disk after 10000 min Should be ok after this procedure"
          Max Gelman made changes -
          Assignee New: Max Gelman [ mgelman08 ]
          Max Gelman made changes -
          Assignee Original: Max Gelman [ mgelman08 ]

            Unassigned Unassigned
            jdtester Jens Fiedelak
            Votes:
            14 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: