hudson.util.IOException2: Could not copy slave.jar to slave

jenkins-ci.org | 3 months ago
  1. 0

    The connection to the slave was working properly, happily compiling the assigned projects. One day the slave was marked as offline and I have been unable to put it online again. SSH logs attached: {noformat} [01/26/10 08:49:09] [SSH] Opening SSH connection to linuxbuilds_pc:22. [01/26/10 08:49:09] [SSH] Authenticating as ntr/******. [01/26/10 08:49:14] [SSH] Authentication successful. [01/26/10 08:49:14] [SSH] The remote users environment is: BASH=/bin/bash BASH_ARGC=() BASH_ARGV=() BASH_EXECUTION_STRING=set BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="3" [1]="2" [2]="48" [3]="1" [4]="release" [5]="i486-pc-linux-gnu") BASH_VERSION='3.2.48(1)-release' DIRSTACK=() EUID=1001 GROUPS=() HOME=/home/ntr HOSTNAME=linuxbuilds HOSTTYPE=i486 IFS=$' \t\n' LANG=en_US.UTF-8 LOGNAME=ntr MACHTYPE=i486-pc-linux-gnu MAIL=/var/mail/ntr OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PIPESTATUS=([0]="0") PPID=4288 PS4='+ ' PWD=/home/ntr SHELL=/bin/bash SHELLOPTS=braceexpand:hashall:interactive-comments SHLVL=1 SSH_CLIENT='192.168.0.126 1248 22' SSH_CONNECTION='192.168.0.126 1248 192.168.0.149 22' TERM=dumb UID=1001 USER=ntr XDG_SESSION_COOKIE=4dcb3640c21109919ee3b7ef49f1c05c-1264492152.139463-403602541 _=']' [01/26/10 08:49:14] [SSH] Checking java version of java [01/26/10 08:49:15] [SSH] java -version returned 1.6.0_16. [01/26/10 08:49:15] [SSH] Starting sftp client. [01/26/10 08:49:15] [SSH] Copying latest slave.jar... hudson.util.IOException2: Could not copy slave.jar to slave at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:376) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:191) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:180) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: hudson.util.IOException2: Could not copy slave.jar to slave at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:373) ... 7 more Caused by: java.io.IOException: Unexpected end of sftp stream. at com.trilead.ssh2.SFTPv3Client.readBytes(SFTPv3Client.java:218) at com.trilead.ssh2.SFTPv3Client.receiveMessage(SFTPv3Client.java:241) at com.trilead.ssh2.SFTPv3Client.write(SFTPv3Client.java:1341) at hudson.plugins.sshslaves.SFTPClient$1.write(SFTPClient.java:78) at org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:70) at org.apache.commons.io.output.CountingOutputStream.write(CountingOutputStream.java:71) at hudson.Util.copyStream(Util.java:405) at hudson.Util.copyStreamAndClose(Util.java:417) at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:368) ... 7 more [01/26/10 08:49:15] [SSH] Connection closed. [01/26/10 09:02:44] [SSH] Opening SSH connection to linuxbuilds_pc:22. [01/26/10 09:02:44] [SSH] Authenticating as ntr/******. [01/26/10 09:02:49] [SSH] Authentication successful. [01/26/10 09:02:49] [SSH] The remote users environment is: BASH=/bin/bash BASH_ARGC=() BASH_ARGV=() BASH_EXECUTION_STRING=set BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="3" [1]="2" [2]="48" [3]="1" [4]="release" [5]="i486-pc-linux-gnu") BASH_VERSION='3.2.48(1)-release' DIRSTACK=() EUID=1001 GROUPS=() HOME=/home/ntr HOSTNAME=linuxbuilds HOSTTYPE=i486 IFS=$' \t\n' LANG=en_US.UTF-8 LOGNAME=ntr MACHTYPE=i486-pc-linux-gnu MAIL=/var/mail/ntr OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PIPESTATUS=([0]="0") PPID=4907 PS4='+ ' PWD=/home/ntr SHELL=/bin/bash SHELLOPTS=braceexpand:hashall:interactive-comments SHLVL=1 SSH_CLIENT='192.168.0.126 1259 22' SSH_CONNECTION='192.168.0.126 1259 192.168.0.149 22' TERM=dumb UID=1001 USER=ntr XDG_SESSION_COOKIE=4dcb3640c21109919ee3b7ef49f1c05c-1264492966.674119-170607766 _=']' [01/26/10 09:02:49] [SSH] Checking java version of java [01/26/10 09:02:49] [SSH] java -version returned 1.6.0_16. [01/26/10 09:02:49] [SSH] Starting sftp client. [01/26/10 09:02:49] [SSH] Copying latest slave.jar... [01/26/10 09:02:49] [SSH] Copied 212,808 bytes. [01/26/10 09:02:49] [SSH] Starting slave process: cd '/home/ntr/hudson' && java -jar slave.jar <===[HUDSON REMOTING CAPACITY]===>channel started Slave.jar version: 1.341 This is a Unix slave Unexpected error in launching a slave. This is probably a bug in Hudson. hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.io.EOFException at hudson.remoting.Request.call(Request.java:137) at hudson.remoting.Channel.call(Channel.java:547) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:318) at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:300) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:193) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:180) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: hudson.remoting.RequestAbortedException: java.io.EOFException at hudson.remoting.Request.abort(Request.java:257) at hudson.remoting.Channel.terminate(Channel.java:594) at hudson.remoting.Channel$ReaderThread.run(Channel.java:872) Caused by: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at hudson.remoting.Channel$ReaderThread.run(Channel.java:852) [01/26/10 09:02:50] [SSH] Error deleting file. java.io.IOException: Sorry, this connection is closed. at com.trilead.ssh2.transport.TransportManager.sendMessage(TransportManager.java:637) at com.trilead.ssh2.channel.ChannelManager.openSessionChannel(ChannelManager.java:582) at com.trilead.ssh2.Session.<init>(Session.java:40) at com.trilead.ssh2.Connection.openSession(Connection.java:1047) at com.trilead.ssh2.SFTPv3Client.<init>(SFTPv3Client.java:100) at com.trilead.ssh2.SFTPv3Client.<init>(SFTPv3Client.java:120) at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:487) at hudson.slaves.ComputerLauncher.afterDisconnect(ComputerLauncher.java:101) at hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:299) at hudson.remoting.Channel.terminate(Channel.java:609) at hudson.remoting.Channel$ReaderThread.run(Channel.java:872) Caused by: java.io.IOException: Remote sent corrupt MAC. at com.trilead.ssh2.transport.TransportConnection.receiveMessage(TransportConnection.java:270) at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:672) at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:470) at java.lang.Thread.run(Unknown Source) [01/26/10 09:02:50] [SSH] Connection closed. [01/26/10 09:02:50] slave agent was terminated java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at hudson.remoting.Channel$ReaderThread.run(Channel.java:852) {noformat}

    Jenkins JIRA | 7 years ago | pestalella
    hudson.util.IOException2: Could not copy slave.jar to slave
  2. 0

    The connection to the slave was working properly, happily compiling the assigned projects. One day the slave was marked as offline and I have been unable to put it online again. SSH logs attached: {noformat} [01/26/10 08:49:09] [SSH] Opening SSH connection to linuxbuilds_pc:22. [01/26/10 08:49:09] [SSH] Authenticating as ntr/******. [01/26/10 08:49:14] [SSH] Authentication successful. [01/26/10 08:49:14] [SSH] The remote users environment is: BASH=/bin/bash BASH_ARGC=() BASH_ARGV=() BASH_EXECUTION_STRING=set BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="3" [1]="2" [2]="48" [3]="1" [4]="release" [5]="i486-pc-linux-gnu") BASH_VERSION='3.2.48(1)-release' DIRSTACK=() EUID=1001 GROUPS=() HOME=/home/ntr HOSTNAME=linuxbuilds HOSTTYPE=i486 IFS=$' \t\n' LANG=en_US.UTF-8 LOGNAME=ntr MACHTYPE=i486-pc-linux-gnu MAIL=/var/mail/ntr OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PIPESTATUS=([0]="0") PPID=4288 PS4='+ ' PWD=/home/ntr SHELL=/bin/bash SHELLOPTS=braceexpand:hashall:interactive-comments SHLVL=1 SSH_CLIENT='192.168.0.126 1248 22' SSH_CONNECTION='192.168.0.126 1248 192.168.0.149 22' TERM=dumb UID=1001 USER=ntr XDG_SESSION_COOKIE=4dcb3640c21109919ee3b7ef49f1c05c-1264492152.139463-403602541 _=']' [01/26/10 08:49:14] [SSH] Checking java version of java [01/26/10 08:49:15] [SSH] java -version returned 1.6.0_16. [01/26/10 08:49:15] [SSH] Starting sftp client. [01/26/10 08:49:15] [SSH] Copying latest slave.jar... hudson.util.IOException2: Could not copy slave.jar to slave at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:376) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:191) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:180) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: hudson.util.IOException2: Could not copy slave.jar to slave at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:373) ... 7 more Caused by: java.io.IOException: Unexpected end of sftp stream. at com.trilead.ssh2.SFTPv3Client.readBytes(SFTPv3Client.java:218) at com.trilead.ssh2.SFTPv3Client.receiveMessage(SFTPv3Client.java:241) at com.trilead.ssh2.SFTPv3Client.write(SFTPv3Client.java:1341) at hudson.plugins.sshslaves.SFTPClient$1.write(SFTPClient.java:78) at org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:70) at org.apache.commons.io.output.CountingOutputStream.write(CountingOutputStream.java:71) at hudson.Util.copyStream(Util.java:405) at hudson.Util.copyStreamAndClose(Util.java:417) at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:368) ... 7 more [01/26/10 08:49:15] [SSH] Connection closed. [01/26/10 09:02:44] [SSH] Opening SSH connection to linuxbuilds_pc:22. [01/26/10 09:02:44] [SSH] Authenticating as ntr/******. [01/26/10 09:02:49] [SSH] Authentication successful. [01/26/10 09:02:49] [SSH] The remote users environment is: BASH=/bin/bash BASH_ARGC=() BASH_ARGV=() BASH_EXECUTION_STRING=set BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="3" [1]="2" [2]="48" [3]="1" [4]="release" [5]="i486-pc-linux-gnu") BASH_VERSION='3.2.48(1)-release' DIRSTACK=() EUID=1001 GROUPS=() HOME=/home/ntr HOSTNAME=linuxbuilds HOSTTYPE=i486 IFS=$' \t\n' LANG=en_US.UTF-8 LOGNAME=ntr MACHTYPE=i486-pc-linux-gnu MAIL=/var/mail/ntr OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PIPESTATUS=([0]="0") PPID=4907 PS4='+ ' PWD=/home/ntr SHELL=/bin/bash SHELLOPTS=braceexpand:hashall:interactive-comments SHLVL=1 SSH_CLIENT='192.168.0.126 1259 22' SSH_CONNECTION='192.168.0.126 1259 192.168.0.149 22' TERM=dumb UID=1001 USER=ntr XDG_SESSION_COOKIE=4dcb3640c21109919ee3b7ef49f1c05c-1264492966.674119-170607766 _=']' [01/26/10 09:02:49] [SSH] Checking java version of java [01/26/10 09:02:49] [SSH] java -version returned 1.6.0_16. [01/26/10 09:02:49] [SSH] Starting sftp client. [01/26/10 09:02:49] [SSH] Copying latest slave.jar... [01/26/10 09:02:49] [SSH] Copied 212,808 bytes. [01/26/10 09:02:49] [SSH] Starting slave process: cd '/home/ntr/hudson' && java -jar slave.jar <===[HUDSON REMOTING CAPACITY]===>channel started Slave.jar version: 1.341 This is a Unix slave Unexpected error in launching a slave. This is probably a bug in Hudson. hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.io.EOFException at hudson.remoting.Request.call(Request.java:137) at hudson.remoting.Channel.call(Channel.java:547) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:318) at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:300) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:193) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:180) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: hudson.remoting.RequestAbortedException: java.io.EOFException at hudson.remoting.Request.abort(Request.java:257) at hudson.remoting.Channel.terminate(Channel.java:594) at hudson.remoting.Channel$ReaderThread.run(Channel.java:872) Caused by: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at hudson.remoting.Channel$ReaderThread.run(Channel.java:852) [01/26/10 09:02:50] [SSH] Error deleting file. java.io.IOException: Sorry, this connection is closed. at com.trilead.ssh2.transport.TransportManager.sendMessage(TransportManager.java:637) at com.trilead.ssh2.channel.ChannelManager.openSessionChannel(ChannelManager.java:582) at com.trilead.ssh2.Session.<init>(Session.java:40) at com.trilead.ssh2.Connection.openSession(Connection.java:1047) at com.trilead.ssh2.SFTPv3Client.<init>(SFTPv3Client.java:100) at com.trilead.ssh2.SFTPv3Client.<init>(SFTPv3Client.java:120) at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:487) at hudson.slaves.ComputerLauncher.afterDisconnect(ComputerLauncher.java:101) at hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:299) at hudson.remoting.Channel.terminate(Channel.java:609) at hudson.remoting.Channel$ReaderThread.run(Channel.java:872) Caused by: java.io.IOException: Remote sent corrupt MAC. at com.trilead.ssh2.transport.TransportConnection.receiveMessage(TransportConnection.java:270) at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:672) at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:470) at java.lang.Thread.run(Unknown Source) [01/26/10 09:02:50] [SSH] Connection closed. [01/26/10 09:02:50] slave agent was terminated java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at hudson.remoting.Channel$ReaderThread.run(Channel.java:852) {noformat}

    Jenkins JIRA | 7 years ago | pestalella
    hudson.util.IOException2: Could not copy slave.jar to slave
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Auto installation of ssh-slaves via "ssh" install the wrong version of Java. We have configured Jenkins to use Java 6 30u, but it's installing Java 6 16u on Oracle Linux (Redhat). We see that oracle.com has the version of Java we are expecting to be installed. Log file below, please note that it's even worst, because it even fail installing the too old version of Java. [03/21/12 09:38:04] [SSH] Opening SSH connection to 172.23.8.70:22. [03/21/12 09:38:04] [SSH] Authenticating as root with C:\Users\CISERVER\.ssh\id_rsa. [03/21/12 09:38:04] [SSH] Authentication successful. [03/21/12 09:38:11] [SSH] The remote users environment is: BASH=/bin/bash BASH_ARGC=() BASH_ARGV=() BASH_EXECUTION_STRING=set BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="3" [1]="2" [2]="25" [3]="1" [4]="release" [5]="x86_64-redhat-linux-gnu") BASH_VERSION='3.2.25(1)-release' COLORS=/etc/DIR_COLORS CVS_RSH=ssh DIRSTACK=() EUID=0 GROUPS=() G_BROKEN_FILENAMES=1 HOME=/root HOSTNAME=oxgslcopsda02 HOSTTYPE=x86_64 IFS=$' \t\n' LANG=en_US.UTF-8 LESSOPEN='|/usr/bin/lesspipe.sh %s' LOGNAME=root LS_COLORS= MACHTYPE=x86_64-redhat-linux-gnu MAIL=/var/mail/root OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin PIPESTATUS=([0]="0") PPID=4006 PS4='+ ' PWD=/root SHELL=/bin/bash SHELLOPTS=braceexpand:hashall:interactive-comments SHLVL=1 SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass SSH_CLIENT='172.23.8.50 65195 22' SSH_CONNECTION='172.23.8.50 65195 172.23.8.70 22' TERM=dumb UID=0 USER=root _=/etc/bashrc consoletype=serial tmpid=0 [03/21/12 09:38:11] [SSH] Checking java version of java [03/21/12 09:40:20] [SSH] java -version returned 1.4.2. [03/21/12 09:40:20] [SSH] Checking java version of /usr/bin/java [03/21/12 09:40:20] [SSH] /usr/bin/java -version returned 1.4.2. [03/21/12 09:40:20] [SSH] Checking java version of /usr/java/default/bin/java Couldn't figure out the Java version of /usr/java/default/bin/java bash: /usr/java/default/bin/java: No such file or directory [03/21/12 09:40:20] [SSH] Checking java version of /usr/java/latest/bin/java Couldn't figure out the Java version of /usr/java/latest/bin/java bash: /usr/java/latest/bin/java: No such file or directory [03/21/12 09:40:20] [SSH] Checking java version of /usr/local/bin/java Couldn't figure out the Java version of /usr/local/bin/java bash: /usr/local/bin/java: No such file or directory [03/21/12 09:40:20] [SSH] Checking java version of /usr/local/java/bin/java Couldn't figure out the Java version of /usr/local/java/bin/java bash: /usr/local/java/bin/java: No such file or directory [03/21/12 09:40:21] [SSH] Checking java version of /jenkinsslave/jdk/bin/java Couldn't figure out the Java version of /jenkinsslave/jdk/bin/java bash: /jenkinsslave/jdk/bin/java: No such file or directory Linux oxgslcopsda02 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:37:40 EST 2012 x86_64 x86_64 x86_64 GNU/Linux Installing JDK6u16 hudson.util.IOException2: Could not find any known supported java version in [java, /usr/bin/java, /usr/java/default/bin/java, /usr/java/latest/bin/java, /usr/local/bin/java, /usr/local/java/bin/java, /jenkinsslave/jdk/bin/java], and we also failed to install JDK as a fallback at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:350) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:288) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:200) 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:662) Caused by: java.io.IOException: Unexpected end of sftp stream. at com.trilead.ssh2.SFTPv3Client.readBytes(SFTPv3Client.java:218) at com.trilead.ssh2.SFTPv3Client.receiveMessage(SFTPv3Client.java:241) at com.trilead.ssh2.SFTPv3Client.write(SFTPv3Client.java:1341) at hudson.plugins.sshslaves.SFTPClient$1.write(SFTPClient.java:102) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109) at hudson.Util.copyStream(Util.java:409) at hudson.Util.copyStreamAndClose(Util.java:421) at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:418) at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:348) ... 7 more [03/21/12 09:41:35] [SSH] Connection closed.

    Jenkins JIRA | 5 years ago | Sebastien Tardif
    hudson.util.IOException2: Could not find any known supported java version in [java, /usr/bin/java, /usr/java/default/bin/java, /usr/java/latest/bin/java, /usr/local/bin/java, /usr/local/java/bin/java, /jenkinsslave/jdk/bin/java], and we also failed to install JDK as a fallback
  5. 0

    Auto installation of ssh-slaves via "ssh" install the wrong version of Java. We have configured Jenkins to use Java 6 30u, but it's installing Java 6 16u on Oracle Linux (Redhat). We see that oracle.com has the version of Java we are expecting to be installed. Log file below, please note that it's even worst, because it even fail installing the too old version of Java. [03/21/12 09:38:04] [SSH] Opening SSH connection to 172.23.8.70:22. [03/21/12 09:38:04] [SSH] Authenticating as root with C:\Users\CISERVER\.ssh\id_rsa. [03/21/12 09:38:04] [SSH] Authentication successful. [03/21/12 09:38:11] [SSH] The remote users environment is: BASH=/bin/bash BASH_ARGC=() BASH_ARGV=() BASH_EXECUTION_STRING=set BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="3" [1]="2" [2]="25" [3]="1" [4]="release" [5]="x86_64-redhat-linux-gnu") BASH_VERSION='3.2.25(1)-release' COLORS=/etc/DIR_COLORS CVS_RSH=ssh DIRSTACK=() EUID=0 GROUPS=() G_BROKEN_FILENAMES=1 HOME=/root HOSTNAME=oxgslcopsda02 HOSTTYPE=x86_64 IFS=$' \t\n' LANG=en_US.UTF-8 LESSOPEN='|/usr/bin/lesspipe.sh %s' LOGNAME=root LS_COLORS= MACHTYPE=x86_64-redhat-linux-gnu MAIL=/var/mail/root OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin PIPESTATUS=([0]="0") PPID=4006 PS4='+ ' PWD=/root SHELL=/bin/bash SHELLOPTS=braceexpand:hashall:interactive-comments SHLVL=1 SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass SSH_CLIENT='172.23.8.50 65195 22' SSH_CONNECTION='172.23.8.50 65195 172.23.8.70 22' TERM=dumb UID=0 USER=root _=/etc/bashrc consoletype=serial tmpid=0 [03/21/12 09:38:11] [SSH] Checking java version of java [03/21/12 09:40:20] [SSH] java -version returned 1.4.2. [03/21/12 09:40:20] [SSH] Checking java version of /usr/bin/java [03/21/12 09:40:20] [SSH] /usr/bin/java -version returned 1.4.2. [03/21/12 09:40:20] [SSH] Checking java version of /usr/java/default/bin/java Couldn't figure out the Java version of /usr/java/default/bin/java bash: /usr/java/default/bin/java: No such file or directory [03/21/12 09:40:20] [SSH] Checking java version of /usr/java/latest/bin/java Couldn't figure out the Java version of /usr/java/latest/bin/java bash: /usr/java/latest/bin/java: No such file or directory [03/21/12 09:40:20] [SSH] Checking java version of /usr/local/bin/java Couldn't figure out the Java version of /usr/local/bin/java bash: /usr/local/bin/java: No such file or directory [03/21/12 09:40:20] [SSH] Checking java version of /usr/local/java/bin/java Couldn't figure out the Java version of /usr/local/java/bin/java bash: /usr/local/java/bin/java: No such file or directory [03/21/12 09:40:21] [SSH] Checking java version of /jenkinsslave/jdk/bin/java Couldn't figure out the Java version of /jenkinsslave/jdk/bin/java bash: /jenkinsslave/jdk/bin/java: No such file or directory Linux oxgslcopsda02 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:37:40 EST 2012 x86_64 x86_64 x86_64 GNU/Linux Installing JDK6u16 hudson.util.IOException2: Could not find any known supported java version in [java, /usr/bin/java, /usr/java/default/bin/java, /usr/java/latest/bin/java, /usr/local/bin/java, /usr/local/java/bin/java, /jenkinsslave/jdk/bin/java], and we also failed to install JDK as a fallback at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:350) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:288) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:200) 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:662) Caused by: java.io.IOException: Unexpected end of sftp stream. at com.trilead.ssh2.SFTPv3Client.readBytes(SFTPv3Client.java:218) at com.trilead.ssh2.SFTPv3Client.receiveMessage(SFTPv3Client.java:241) at com.trilead.ssh2.SFTPv3Client.write(SFTPv3Client.java:1341) at hudson.plugins.sshslaves.SFTPClient$1.write(SFTPClient.java:102) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109) at hudson.Util.copyStream(Util.java:409) at hudson.Util.copyStreamAndClose(Util.java:421) at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:418) at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:348) ... 7 more [03/21/12 09:41:35] [SSH] Connection closed.

    Jenkins JIRA | 5 years ago | Sebastien Tardif
    hudson.util.IOException2: Could not find any known supported java version in [java, /usr/bin/java, /usr/java/default/bin/java, /usr/java/latest/bin/java, /usr/local/bin/java, /usr/local/java/bin/java, /jenkinsslave/jdk/bin/java], and we also failed to install JDK as a fallback

    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

      Unexpected end of sftp stream.

      at com.trilead.ssh2.SFTPv3Client.readBytes()
    2. Trilead
      SFTPv3Client.write
      1. com.trilead.ssh2.SFTPv3Client.readBytes(SFTPv3Client.java:218)
      2. com.trilead.ssh2.SFTPv3Client.receiveMessage(SFTPv3Client.java:241)
      3. com.trilead.ssh2.SFTPv3Client.write(SFTPv3Client.java:1341)
      3 frames
    3. hudson.plugins.sshslaves
      SFTPClient$1.write
      1. hudson.plugins.sshslaves.SFTPClient$1.write(SFTPClient.java:78)
      1 frame
    4. Commons IO
      CountingOutputStream.write
      1. org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:70)
      2. org.apache.commons.io.output.CountingOutputStream.write(CountingOutputStream.java:71)
      2 frames
    5. Hudson
      Util.copyStreamAndClose
      1. hudson.Util.copyStream(Util.java:405)
      2. hudson.Util.copyStreamAndClose(Util.java:417)
      2 frames
    6. hudson.plugins.sshslaves
      SSHLauncher.launch
      1. hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:368)
      2. hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:191)
      2 frames
    7. Hudson
      SlaveComputer$1.call
      1. hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:180)
      1 frame
    8. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      2. java.util.concurrent.FutureTask.run(Unknown Source)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      5. java.lang.Thread.run(Unknown Source)
      5 frames