-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
Often, the code that handles lost connection and report that problem is different from code that uses proxies that go over this channel. Example stack trace:
15:44:26 java.io.IOException: Backing channel is disconnected. 15:44:26 at hudson.remoting.RemoteInvocationHandler.channelOrFail(RemoteInvocationHandler.java:184) 15:44:26 at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:249) 15:44:26 at com.sun.proxy.$Proxy104.isAlive(Unknown Source) 15:44:26 at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:996) 15:44:26 at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:166) 15:44:26 at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:853) 15:44:26 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) 15:44:26 at hudson.model.Run.execute(Run.java:1738) 15:44:26 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) 15:44:26 at hudson.model.ResourceController.execute(ResourceController.java:98) 15:44:26 at hudson.model.Executor.run(Executor.java:410)
The error diagnostics is easier if the cause of the channel loss is linked to this exception.
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.