Sometimes (randomly), my tests are failing with this error. Tests runs on docker nodes. Jenkins (or docker plugin) cancel docker node where tests are executed too early. Jenkins job can't finish because executor is terminated.
Jenkins version: 2.100 | Docker Plugin version: 1.1.2
FATAL: command execution failed
Command close created at
at hudson.remoting.Command.<init>(Command.java:62)
at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1220)
at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1218)
at hudson.remoting.Channel.close(Channel.java:1391)
at hudson.remoting.Channel.close(Channel.java:1358)
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1225)
Caused: hudson.remoting.Channel$OrderlyShutdown
at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1226)
at hudson.remoting.Channel$1.handle(Channel.java:561)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:87)
Caused: java.io.IOException: Backing channel 'docker-4e1dcb53088a' is disconnected.
at hudson.remoting.RemoteInvocationHandler.channelOrFail(RemoteInvocationHandler.java:212)
at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:281)
at com.sun.proxy.$Proxy87.isAlive(Unknown Source)
at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1137)
at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:1129)
at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:155)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1727)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
src/main/java/hudson/remoting/Channel.java
src/main/java/hudson/remoting/RemoteInvocationHandler.java
http://jenkins-ci.org/commit/remoting/89a1774918d1e2adba41ae7ae4ba34f095dc2676
Log:
JENKINS-39289 When a proxy fails, report what caused the channel to go down
Today, this requires out of bound knowledge about which connection the
proxy was representing, then use other means to figure out why it has
failed.
This exception chaining shortens that step and makes it easy to find the
cause as to why the channel was shut down.