Jenkins Issue: hudson.remoting.ChannelClosedException: channel is already closed

Summary : 

We see the following hudson.remoting.ChannelClosedException exception: the channel is already closed Reason: java.net.SocketException: Connection reset Any suggestions for resolving it? Full exclusion text below

 [21-11-2013 14:29:54] FATAL: channel is already closed [21-11-2013 14:29:54] hudson.remoting.ChannelClosedException: channel is already closed [21-11-2013 14:29:54] at hudson.remoting.Channel.send(Channel.java:516) [21-11-2013 14:29:54] at hudson.remoting.Request.call(Request.java:129) [21-11-2013 14:29:54] at hudson.remoting.Channel.call(Channel.java:714) [21-11-2013 14:29:54] at hudson.Launcher$RemoteLauncher.kill(Launcher.java:887) [21-11-2013 14:29:54] at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:609) [21-11-2013 14:29:54] at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:67) [21-11-2013 14:29:54] at hudson.model.Run.execute(Run.java:1603) [21-11-2013 14:29:54] at hudson.model.Run.run(Run.java:1549) [21-11-2013 14:29:54] at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:60) [21-11-2013 14:29:54] at hudson.model.ResourceController.execute(ResourceController.java:88) [21-11-2013 14:29:54] at hudson.model.Executor.run(Executor.java:247) [21-11-2013 14:29:54] Caused by: java.net.SocketException: Connection reset [21-11-2013 14:29:54] at java.net.SocketInputStream.read(Unknown Source) [21-11-2013 14:29:54] at java.net.SocketInputStream.read(Unknown Source) [21-11-2013 14:29:54] at java.io.BufferedInputStream.fill(Unknown Source) [21-11-2013 14:29:54] at java.io.BufferedInputStream.read(Unknown Source) [21-11-2013 14:29:54] at hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:77) [21-11-2013 14:29:54] at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source) [21-11-2013 14:29:54] at java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source) [21-11-2013 14:29:54] at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source) [21-11-2013 14:29:54] at java.io.ObjectInputStream.readObject0(Unknown Source) [21-11-2013 14:29:54] at java.io.ObjectInputStream.readObject(Unknown Source) [21-11-2013 14:29:54] at hudson.remoting.Command.readFrom(Command.java:92) [21-11-2013 14:29:54] at hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:71) 
+8
source share
2 answers

As I know, this error can occur when the assembly is performed on the slave PC and the client stops ... If this is not a master-slave problem, see the full jenkins log (you can find it in the Jenkins installation directory) and see what causes a problem (maybe there is a problem with a bunch, or I don’t know what is the cause of the problem), Anyway, restarting Jenkins might be the solution!

+3
source

You get this error for 2 reasons:

  1. The first time Jenkins tries to run SSH on a remote host, the server asks the user if he wants to add the SHH key to his known keys. Usually on the command line, you simply answer YES and move on. But Jenkins will be stuck on this line. Then the connection attempt will fail. Solution: manually connect to the remote host from jenkins server using the command line once. Then you can answer YES manually. All future Jenkins attempts will work.

  2. The java agent stopped working for an unclear reason on the remote host. Solution: restart the Java agent. Simple enough ... but maybe not if you don't know how to restart it! I found that a simple way is to change the timeout value (connection timeout in seconds) in the node configuration. When you save the new value, you will actually restart the Java agent!

+1
source

Source: https://habr.com/ru/post/958617/


All Articles