java.io.IOException: SSH channel is closed. (Close requested by remote)

Jenkins JIRA | Asmund Ostvold | 3 years ago
  1. 0

    Test environment reproducing the issue is a Jenkins instance with 24 slave nodes all on the same machine with the same remote FS. To not get false negatives because of sshd limits /etc/ssh/sshd cofing need a change: < MaxSessions 200 < MaxStartups 200:30:400 The output of failing nodes are different because of the jar file being corrupted in different ways. I pasted some examples below. The issues is that the slave jar files are removed and copy by all ssh-slaves nodes. Code from src/main/java/hudson/plugins/sshslaves/SSHLauncher.java: [...] connection.exec("rm " + workingDirectory + "/slave.jar", new NullStream()); [...] scp.put(IOUtils.toByteArray(is), "slave.jar", workingDirectory, "0644"); [...] I have created a pull request with suggested fix: https://github.com/jenkinsci/ssh-slaves-plugin/pull/17 Asmund [05/02/14 12:23:38] [SSH] Checking java version of java [05/02/14 12:23:39] [SSH] java -version returned 1.7.0_55. [05/02/14 12:23:39] [SSH] Starting sftp client. [05/02/14 12:23:39] [SSH] Copying latest slave.jar... [05/02/14 12:23:39] [SSH] Copied 409,398 bytes. Expanded the channel window size to 4MB [05/02/14 12:23:39] [SSH] Starting slave process: cd "/tmp" && java -jar slave.jar Error: Invalid or corrupt jarfile slave.jar java.io.EOFException: unexpected stream termination at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:200) at hudson.remoting.Channel.<init>(Channel.java:419) at hudson.remoting.Channel.<init>(Channel.java:398) at hudson.remoting.Channel.<init>(Channel.java:394) at hudson.remoting.Channel.<init>(Channel.java:383) at hudson.remoting.Channel.<init>(Channel.java:375) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:338) at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:901) at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:126) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:658) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) [05/02/14 12:23:39] [SSH] Connection closed. [05/02/14 12:25:39] [SSH] Checking java version of java [05/02/14 12:25:39] [SSH] java -version returned 1.7.0_55. [05/02/14 12:25:39] [SSH] Starting sftp client. [05/02/14 12:25:39] [SSH] Copying latest slave.jar... [05/02/14 12:25:39] [SSH] Copied 409,398 bytes. Expanded the channel window size to 4MB [05/02/14 12:25:39] [SSH] Starting slave process: cd "/tmp" && java -jar slave.jar Error: Unable to access jarfile slave.jar java.io.IOException: SSH channel is closed. (Close requested by remote) at com.trilead.ssh2.channel.ChannelManager.sendData(ChannelManager.java:382) at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:63) at hudson.remoting.BinarySafeStream$2.flush(BinarySafeStream.java:299) at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1822) at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:718) at hudson.remoting.Capability.writePreamble(Capability.java:116) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:182) at hudson.remoting.Channel.<init>(Channel.java:419) at hudson.remoting.Channel.<init>(Channel.java:398) at hudson.remoting.Channel.<init>(Channel.java:394) at hudson.remoting.Channel.<init>(Channel.java:383) at hudson.remoting.Channel.<init>(Channel.java:375) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:338) at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:901) at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:126) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:658) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) [05/02/14 12:25:39] [SSH] Starting slave process: cd "/tmp" && java -jar slave.jar Error: Invalid or corrupt jarfile slave.jar java.io.IOException: SSH channel is closed. (Close requested by remote) at com.trilead.ssh2.channel.ChannelManager.sendData(ChannelManager.java:382) at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:63) at hudson.remoting.BinarySafeStream$2._write(BinarySafeStream.java:272) at hudson.remoting.BinarySafeStream$2.write(BinarySafeStream.java:255) at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1876) at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1785) at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1285) at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1230) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1426) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1576) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:350) at hudson.remoting.Capability.writePreamble(Capability.java:115) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:182) at hudson.remoting.Channel.<init>(Channel.java:419) at hudson.remoting.Channel.<init>(Channel.java:398) at hudson.remoting.Channel.<init>(Channel.java:394) at hudson.remoting.Channel.<init>(Channel.java:383) at hudson.remoting.Channel.<init>(Channel.java:375) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:338) at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:901) at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:126) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:658) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

    Jenkins JIRA | 3 years ago | Asmund Ostvold
    java.io.IOException: SSH channel is closed. (Close requested by remote)
  2. 0

    Test environment reproducing the issue is a Jenkins instance with 24 slave nodes all on the same machine with the same remote FS. To not get false negatives because of sshd limits /etc/ssh/sshd cofing need a change: < MaxSessions 200 < MaxStartups 200:30:400 The output of failing nodes are different because of the jar file being corrupted in different ways. I pasted some examples below. The issues is that the slave jar files are removed and copy by all ssh-slaves nodes. Code from src/main/java/hudson/plugins/sshslaves/SSHLauncher.java: [...] connection.exec("rm " + workingDirectory + "/slave.jar", new NullStream()); [...] scp.put(IOUtils.toByteArray(is), "slave.jar", workingDirectory, "0644"); [...] I have created a pull request with suggested fix: https://github.com/jenkinsci/ssh-slaves-plugin/pull/17 Asmund [05/02/14 12:23:38] [SSH] Checking java version of java [05/02/14 12:23:39] [SSH] java -version returned 1.7.0_55. [05/02/14 12:23:39] [SSH] Starting sftp client. [05/02/14 12:23:39] [SSH] Copying latest slave.jar... [05/02/14 12:23:39] [SSH] Copied 409,398 bytes. Expanded the channel window size to 4MB [05/02/14 12:23:39] [SSH] Starting slave process: cd "/tmp" && java -jar slave.jar Error: Invalid or corrupt jarfile slave.jar java.io.EOFException: unexpected stream termination at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:200) at hudson.remoting.Channel.<init>(Channel.java:419) at hudson.remoting.Channel.<init>(Channel.java:398) at hudson.remoting.Channel.<init>(Channel.java:394) at hudson.remoting.Channel.<init>(Channel.java:383) at hudson.remoting.Channel.<init>(Channel.java:375) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:338) at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:901) at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:126) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:658) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) [05/02/14 12:23:39] [SSH] Connection closed. [05/02/14 12:25:39] [SSH] Checking java version of java [05/02/14 12:25:39] [SSH] java -version returned 1.7.0_55. [05/02/14 12:25:39] [SSH] Starting sftp client. [05/02/14 12:25:39] [SSH] Copying latest slave.jar... [05/02/14 12:25:39] [SSH] Copied 409,398 bytes. Expanded the channel window size to 4MB [05/02/14 12:25:39] [SSH] Starting slave process: cd "/tmp" && java -jar slave.jar Error: Unable to access jarfile slave.jar java.io.IOException: SSH channel is closed. (Close requested by remote) at com.trilead.ssh2.channel.ChannelManager.sendData(ChannelManager.java:382) at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:63) at hudson.remoting.BinarySafeStream$2.flush(BinarySafeStream.java:299) at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1822) at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:718) at hudson.remoting.Capability.writePreamble(Capability.java:116) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:182) at hudson.remoting.Channel.<init>(Channel.java:419) at hudson.remoting.Channel.<init>(Channel.java:398) at hudson.remoting.Channel.<init>(Channel.java:394) at hudson.remoting.Channel.<init>(Channel.java:383) at hudson.remoting.Channel.<init>(Channel.java:375) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:338) at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:901) at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:126) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:658) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) [05/02/14 12:25:39] [SSH] Starting slave process: cd "/tmp" && java -jar slave.jar Error: Invalid or corrupt jarfile slave.jar java.io.IOException: SSH channel is closed. (Close requested by remote) at com.trilead.ssh2.channel.ChannelManager.sendData(ChannelManager.java:382) at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:63) at hudson.remoting.BinarySafeStream$2._write(BinarySafeStream.java:272) at hudson.remoting.BinarySafeStream$2.write(BinarySafeStream.java:255) at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1876) at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1785) at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1285) at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1230) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1426) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1576) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:350) at hudson.remoting.Capability.writePreamble(Capability.java:115) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:182) at hudson.remoting.Channel.<init>(Channel.java:419) at hudson.remoting.Channel.<init>(Channel.java:398) at hudson.remoting.Channel.<init>(Channel.java:394) at hudson.remoting.Channel.<init>(Channel.java:383) at hudson.remoting.Channel.<init>(Channel.java:375) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:338) at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:901) at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:126) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:658) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

    Jenkins JIRA | 3 years ago | Asmund Ostvold
    java.io.IOException: SSH channel is closed. (Close requested by remote)
  3. 0

    Jenkins users - Possible causes/fixes? java.io.IOException: SSH channel is closed. (Close requested by remote)

    nabble.com | 11 months ago
    java.io.IOException: SSH channel is closed. (Close requested by remote)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    One of our builds was hung for over 10hours, although the build was finished after 35 minutes. It seems as if the JUnit artefacts publisher had an issue reading the JUnit test-results. The console log was only showing the following lines: {code} Build #200508 (Feb 16, 2010 8:28:54 PM) Started by upstream project "ppg-dev-quick" build number 200703 Building remotely on srv085 ... BUILD SUCCESSFUL Total time: 35 minutes 41 seconds Publishing Javadoc Archiving artifacts (hourglass) {code} After forcibly stopping the build, the log showed the following exceptions: {code} ERROR: Failed to archive artifacts: ppg-build/build/dist/,ppg-build/build/junit/report/,ppg-build/build/server/,ppg-build/build/emma/,ppg-build/build/doc,ppg-build/build/server hudson.util.IOException2: hudson.util.IOException2: Failed to extract /home/hudson/hudson/workspace/ppg-dev/ppg-build/build/dist/,ppg-build/build/junit/report/,ppg-build/build/server/,ppg-build/build/emma/,ppg-build/build/doc,ppg-build/build/server at hudson.FilePath.readFromTar(FilePath.java:1640) at hudson.FilePath.copyRecursiveTo(FilePath.java:1431) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:117) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550) at hudson.model.Build$RunnerImpl.post2(Build.java:152) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1221) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Caused by: java.io.IOException at hudson.remoting.FastPipedInputStream.read(FastPipedInputStream.java:164) at hudson.util.HeadBufferingStream.read(HeadBufferingStream.java:61) at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:221) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141) at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92) at org.apache.tools.tar.TarBuffer.readBlock(TarBuffer.java:257) at org.apache.tools.tar.TarBuffer.readRecord(TarBuffer.java:223) at hudson.org.apache.tools.tar.TarInputStream.read(TarInputStream.java:345) at java.io.FilterInputStream.read(FilterInputStream.java:90) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025) at org.apache.commons.io.IOUtils.copy(IOUtils.java:999) at hudson.util.IOUtils.copy(IOUtils.java:29) at hudson.FilePath.readFromTar(FilePath.java:1628) ... 12 more at hudson.FilePath.copyRecursiveTo(FilePath.java:1438) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:117) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550) at hudson.model.Build$RunnerImpl.post2(Build.java:152) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1221) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Caused by: java.util.concurrent.ExecutionException: hudson.remoting.RequestAbortedException: java.io.EOFException at hudson.remoting.Request$1.get(Request.java:236) at hudson.remoting.Request$1.get(Request.java:172) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59) at hudson.FilePath.copyRecursiveTo(FilePath.java:1434) ... 11 more Caused by: hudson.remoting.RequestAbortedException: java.io.EOFException at hudson.remoting.Request.abort(Request.java:257) at hudson.remoting.Channel.terminate(Channel.java:598) at hudson.remoting.Channel$ReaderThread.run(Channel.java:876) Caused by: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:2700) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1648) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at hudson.remoting.Channel$ReaderThread.run(Channel.java:856) Recording test results ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception java.lang.NullPointerException at hudson.tasks.junit.JUnitParser.parse(JUnitParser.java:66) at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:108) at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:120) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550) at hudson.model.Build$RunnerImpl.post2(Build.java:152) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1221) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.lang.NullPointerException at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550) at hudson.model.Build$RunnerImpl.post2(Build.java:152) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1221) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Triggering a new build of ppg-rcp #200494 Finished: SUCCESS {code} There is a NPE in the JUnitParser (line 66) and one in the ViolationsPublisher (line 74). {code} public TestResult parse(String testResultLocations, AbstractBuild build, Launcher launcher, TaskListener listener) throws InterruptedException, IOException { final long buildTime = build.getTimestamp().getTimeInMillis(); final long timeOnMaster = System.currentTimeMillis(); // [BUG 3123310] TODO - Test Result Refactor: review and fix TestDataPublisher/TestAction subsystem] // also get code that deals with testDataPublishers from JUnitResultArchiver.perform 66: TestResult testResult = build.getWorkspace().act( new ParseResultCallable(testResultLocations, buildTime, timeOnMaster)); return testResult; } {code} {code} public boolean perform( AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { FilePath htmlPath = new FilePath( new File(build.getProject().getRootDir(), VIOLATIONS)); FilePath targetPath = new FilePath( new File(build.getRootDir(), VIOLATIONS)); 74: ViolationsReport report = build.getWorkspace().act( new ViolationsCollector(false, targetPath, htmlPath, config)); report.setConfig(config); report.setBuild(build); report.setBuildResult(); build.getActions().add( new ViolationsBuildAction(build, report)); return true; } {code} It seems in both cases as if either the variable "build" or the result of "build.getWorkspace()" is null. But I assume that this could also be due to the focibly stop of the build or the channel close, see below. In the System Log of Hudson I found the following exceptions: {code} Feb 16, 2010 9:08:21 PM hudson.model.AbstractBuild$AbstractRunner performAllBuildStep WARNING: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception java.lang.NullPointerException at hudson.tasks.junit.JUnitParser.parse(JUnitParser.java:66) at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:108) at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:120) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550) at hudson.model.Build$RunnerImpl.post2(Build.java:152) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1221) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Feb 16, 2010 9:08:21 PM hudson.remoting.Channel$ReaderThread run SEVERE: I/O error in channel srv085 java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:2700) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1648) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at hudson.remoting.Channel$ReaderThread.run(Channel.java:856) Feb 16, 2010 9:08:19 PM hudson.remoting.Request$2 run SEVERE: Failed to send back a reply java.io.IOException: SSH channel is closed. (Close requested by remote) at com.trilead.ssh2.channel.ChannelManager.sendData(ChannelManager.java:383) at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:63) at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838) at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747) at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1249) at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1203) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1387) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1538) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329) at hudson.remoting.Channel.send(Channel.java:417) at hudson.remoting.Request$2.run(Request.java:282) 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) {code} The exceptions in the System log indicate that there was an issue with the SSH channel, trying to move the artifacts from the build node to the Hudson server.

    Jenkins JIRA | 7 years ago | Michael Rumpf
    java.io.IOException: SSH channel is closed. (Close requested by remote)
  6. 0

    Hi Team, Builds are failing and i could see the below errors in catalina.out log.May i know what could be the reason please? It sayd Java heap size issue but we have set Xmx for 6GB. Jan 28, 2013 1:48:42 AM hudson.triggers.SafeTimerTask run SEVERE: Timer task hudson.model.LoadStatistics$LoadStatisticsUpdater@1efa7ea7 failed java.lang.OutOfMemoryError: Java heap space Jan 28, 2013 1:48:42 AM hudson.slaves.ChannelPinger$1 onDead INFO: Ping failed. Terminating the channel. java.io.IOException: SSH channel is closed. (Close requested by remote) at com.trilead.ssh2.channel.ChannelManager.sendData(ChannelManager.java:383) at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:63) at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838) at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747) at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1249) at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1203) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1387) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1538) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329) at hudson.remoting.Command.writeTo(Command.java:81) at hudson.remoting.ClassicCommandTransport.write(ClassicCommandTransport.java:41) at hudson.remoting.Channel.send(Channel.java:496) at hudson.remoting.Request.callAsync(Request.java:208) at hudson.remoting.Channel.callAsync(Channel.java:690) at hudson.remoting.PingThread.ping(PingThread.java:99) at hudson.remoting.PingThread.run(PingThread.java:81) Jan 28, 2013 1:49:22 AM hudson.slaves.ChannelPinger$1 onDead SEVERE: Failed to terminate the channel: java.io.IOException: SSH channel is closed. (Close requested by remote) at com.trilead.ssh2.channel.ChannelManager.sendData(ChannelManager.java:383) at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:63) at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838) at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747) at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1249) at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1203) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1387) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1538) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329) at hudson.remoting.Command.writeTo(Command.java:81) at hudson.remoting.ClassicCommandTransport.write(ClassicCommandTransport.java:41) at hudson.remoting.Channel.send(Channel.java:496) :

    Jenkins JIRA | 4 years ago | Anup T S
    java.io.IOException: SSH channel is closed. (Close requested by remote)

    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.IOException

      SSH channel is closed. (Close requested by remote)

      at com.trilead.ssh2.channel.ChannelManager.sendData()
    2. Trilead
      ChannelOutputStream.write
      1. com.trilead.ssh2.channel.ChannelManager.sendData(ChannelManager.java:382)
      2. com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:63)
      2 frames
    3. Hudson :: Remoting Layer
      BinarySafeStream$2.flush
      1. hudson.remoting.BinarySafeStream$2.flush(BinarySafeStream.java:299)
      1 frame
    4. Java RT
      ObjectOutputStream.flush
      1. java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1822)
      2. java.io.ObjectOutputStream.flush(ObjectOutputStream.java:718)
      2 frames
    5. Hudson :: Remoting Layer
      Channel.<init>
      1. hudson.remoting.Capability.writePreamble(Capability.java:116)
      2. hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:182)
      3. hudson.remoting.Channel.<init>(Channel.java:419)
      4. hudson.remoting.Channel.<init>(Channel.java:398)
      5. hudson.remoting.Channel.<init>(Channel.java:394)
      6. hudson.remoting.Channel.<init>(Channel.java:383)
      7. hudson.remoting.Channel.<init>(Channel.java:375)
      7 frames
    6. Hudson
      SlaveComputer.setChannel
      1. hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:338)
      1 frame
    7. hudson.plugins.sshslaves
      SSHLauncher$2.call
      1. hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:901)
      2. hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:126)
      3. hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:658)
      4. hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642)
      4 frames
    8. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      4. java.lang.Thread.run(Thread.java:744)
      4 frames