java.io.IOException: Unexpected termination of the channel

Jenkins JIRA | nlgu5kq4x6yl | 6 years ago
  1. 0

    I have a simple junit test using SSHLauncher to run on a slave node attached via SSH: public void testSshNode() throws Exception{ String hostname = "localhost"; String username = System.getProperty("user.name"); SSHLauncher launcher = new SSHLauncher( /*host=*/hostname, /*port=*/22, /*username=*/username, /*password=*/"", /*privatekey=*/System.getProperty("user.home")+"/.ssh/arti-key", /*jvmOptions=*/""); DumbSlave node = new DumbSlave( /*name=*/hostname, /*nodeDescription=*/"created by job-executor", /*remoteFS=*/"/nobackup/"+username+"/arti/slaves/"+InetAddress.getLocalHost().getCanonicalHostName(), /*numExecutors=*/"4", // TODO We should not hardcode numExecutors here. /*mode=*/Node.Mode.NORMAL, /*labelString=*/hostname, /*launcher=*/launcher, /*retentionStrategy=*/RetentionStrategy.NOOP, /*nodeProperties=*/Collections.EMPTY_LIST); hudson.addNode(node); FreeStyleProject job = hudson.createProject(FreeStyleProject.class,"testjob"); DescribableList<Builder,Descriptor<Builder>> builders = job.getBuildersList(); builders.clear(); builders.add(new Shell("date >>/tmp/testSshNode.out")); job.setAssignedNode(node); job.scheduleBuild(new UserCause()); waitUntilNoActivity(); assertTrue(true); } It fails with this stacktrace: SEVERE: I/O error in channel localhost java.io.IOException: Unexpected termination of the channel at hudson.remoting.Channel$ReaderThread.run(Channel.java:953) Caused by: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at hudson.remoting.Channel$ReaderThread.run(Channel.java:947) Jan 10, 2011 1:21:26 PM hudson.PluginWrapper stop INFO: Stopping cvs Jan 10, 2011 1:21:26 PM hudson.PluginWrapper stop INFO: Stopping maven-plugin Exception in thread "Channel reader thread: localhost" java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at org.apache.commons.codec.binary.Base64OutputStream.<init>(Base64OutputStream.java:97) at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:178) at hudson.console.ConsoleNote.encodeTo(ConsoleNote.java:156) at hudson.util.StreamTaskListener.annotate(StreamTaskListener.java:157) at hudson.util.StreamTaskListener._error(StreamTaskListener.java:132) at hudson.util.StreamTaskListener.error(StreamTaskListener.java:141) at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:599) at hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:305) at hudson.remoting.Channel.terminate(Channel.java:695) at hudson.remoting.Channel$ReaderThread.run(Channel.java:971) Jan 10, 2011 1:21:26 PM hudson.model.Hudson cleanUp WARNING: Failed to shut down properly java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232) at java.util.concurrent.FutureTask.get(FutureTask.java:91) at hudson.model.Hudson.cleanUp(Hudson.java:2300) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:303) at junit.framework.TestCase.runBare(TestCase.java:140) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:224) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at org.apache.commons.codec.binary.Base64OutputStream.<init>(Base64OutputStream.java:97) at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:178) at hudson.console.ConsoleNote.encodeTo(ConsoleNote.java:156) at hudson.util.StreamTaskListener.annotate(StreamTaskListener.java:157) at hudson.util.StreamTaskListener._error(StreamTaskListener.java:132) at hudson.util.StreamTaskListener.error(StreamTaskListener.java:141) at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:599) at hudson.slaves.SlaveComputer$4.run(SlaveComputer.java:399) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Full log attached.

    Jenkins JIRA | 6 years ago | nlgu5kq4x6yl
    java.io.IOException: Unexpected termination of the channel
  2. 0

    I have a simple junit test using SSHLauncher to run on a slave node attached via SSH: public void testSshNode() throws Exception{ String hostname = "localhost"; String username = System.getProperty("user.name"); SSHLauncher launcher = new SSHLauncher( /*host=*/hostname, /*port=*/22, /*username=*/username, /*password=*/"", /*privatekey=*/System.getProperty("user.home")+"/.ssh/arti-key", /*jvmOptions=*/""); DumbSlave node = new DumbSlave( /*name=*/hostname, /*nodeDescription=*/"created by job-executor", /*remoteFS=*/"/nobackup/"+username+"/arti/slaves/"+InetAddress.getLocalHost().getCanonicalHostName(), /*numExecutors=*/"4", // TODO We should not hardcode numExecutors here. /*mode=*/Node.Mode.NORMAL, /*labelString=*/hostname, /*launcher=*/launcher, /*retentionStrategy=*/RetentionStrategy.NOOP, /*nodeProperties=*/Collections.EMPTY_LIST); hudson.addNode(node); FreeStyleProject job = hudson.createProject(FreeStyleProject.class,"testjob"); DescribableList<Builder,Descriptor<Builder>> builders = job.getBuildersList(); builders.clear(); builders.add(new Shell("date >>/tmp/testSshNode.out")); job.setAssignedNode(node); job.scheduleBuild(new UserCause()); waitUntilNoActivity(); assertTrue(true); } It fails with this stacktrace: SEVERE: I/O error in channel localhost java.io.IOException: Unexpected termination of the channel at hudson.remoting.Channel$ReaderThread.run(Channel.java:953) Caused by: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at hudson.remoting.Channel$ReaderThread.run(Channel.java:947) Jan 10, 2011 1:21:26 PM hudson.PluginWrapper stop INFO: Stopping cvs Jan 10, 2011 1:21:26 PM hudson.PluginWrapper stop INFO: Stopping maven-plugin Exception in thread "Channel reader thread: localhost" java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at org.apache.commons.codec.binary.Base64OutputStream.<init>(Base64OutputStream.java:97) at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:178) at hudson.console.ConsoleNote.encodeTo(ConsoleNote.java:156) at hudson.util.StreamTaskListener.annotate(StreamTaskListener.java:157) at hudson.util.StreamTaskListener._error(StreamTaskListener.java:132) at hudson.util.StreamTaskListener.error(StreamTaskListener.java:141) at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:599) at hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:305) at hudson.remoting.Channel.terminate(Channel.java:695) at hudson.remoting.Channel$ReaderThread.run(Channel.java:971) Jan 10, 2011 1:21:26 PM hudson.model.Hudson cleanUp WARNING: Failed to shut down properly java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232) at java.util.concurrent.FutureTask.get(FutureTask.java:91) at hudson.model.Hudson.cleanUp(Hudson.java:2300) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:303) at junit.framework.TestCase.runBare(TestCase.java:140) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:224) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I[B)V at org.apache.commons.codec.binary.Base64OutputStream.<init>(Base64OutputStream.java:97) at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:178) at hudson.console.ConsoleNote.encodeTo(ConsoleNote.java:156) at hudson.util.StreamTaskListener.annotate(StreamTaskListener.java:157) at hudson.util.StreamTaskListener._error(StreamTaskListener.java:132) at hudson.util.StreamTaskListener.error(StreamTaskListener.java:141) at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:599) at hudson.slaves.SlaveComputer$4.run(SlaveComputer.java:399) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Full log attached.

    Jenkins JIRA | 6 years ago | nlgu5kq4x6yl
    java.io.IOException: Unexpected termination of the channel
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    [JENKINS-6817] FATAL: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the channel - Jenkins JIRA

    jenkins-ci.org | 11 months ago
    hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the channel
  5. 0

    [JENKINS-11130] java.io.IOException: Unexpected termination of the channel - SEVERE: I/O error in channel Chunked connection when using jenkins-cli.jar (works on older Hudson version) - Jenkins JIRA

    jenkins-ci.org | 3 weeks ago
    hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the channel

  1. ex00 1 times, last 2 weeks ago
  2. eti22 1 times, last 1 month ago
  3. pnaranja 1 times, last 5 months ago
8 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.EOFException

    No message provided

    at java.io.ObjectInputStream$BlockDataInputStream.peekByte()
  2. Java RT
    ObjectInputStream.readObject
    1. java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
    2. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
    3. java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    3 frames
  3. Hudson :: Remoting Layer
    Channel$ReaderThread.run
    1. hudson.remoting.Channel$ReaderThread.run(Channel.java:947)
    1 frame