hudson.util.IOException2

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • snip from my config.xml ------ <slaves> <slave> <name>jenkins-slave1.prod</name> <description></description> <remoteFS>/zfs-data/jenkins</remoteFS> <numExecutors>4</numExecutors> <mode>NORMAL</mode> <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/> <launcher class="hudson.plugins.sshslaves.SSHLauncher" plugin="ssh-slaves@1.5"> <host>jenkins-slave1.[REDACTED].com</host> <port>22</port> <credentialsId>[REDACTED]</credentialsId> </launcher> <label>linux centos slave</label> <nodeProperties/> <userId>damien</userId> </slave> </slaves> ------ I created a slave, and I am trying to connect it. This is a brand new installation. Here is the info on the slave: ------ [root@jenkins-slave1 ~]# uname -a Linux jenkins-slave1.[REDACTED].com 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux [root@jenkins-slave1 ~]# /usr/bin/java -version java version "1.6.0_30" OpenJDK Runtime Environment (IcedTea6 1.13.1) (rhel-3.1.13.1.el6_5-x86_64) OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode) ------ however when trying to connect the node it cannot find java: ------ [01/31/14 11:11:58] [SSH] Opening SSH connection to jenkins-slave1.[REDACTED].com:22. [01/31/14 11:11:59] [SSH] Authentication successful. [01/31/14 11:11:59] [SSH] The remote users environment is: [01/31/14 11:11:59] [SSH] Checking java version of java Couldn't figure out the Java version of java [01/31/14 11:11:59] [SSH] Checking java version of /usr/bin/java Couldn't figure out the Java version of /usr/bin/java [01/31/14 11:11:59] [SSH] Checking java version of /usr/java/default/bin/java Couldn't figure out the Java version of /usr/java/default/bin/java [01/31/14 11:11:59] [SSH] Checking java version of /usr/java/latest/bin/java Couldn't figure out the Java version of /usr/java/latest/bin/java [01/31/14 11:11:59] [SSH] Checking java version of /usr/local/bin/java Couldn't figure out the Java version of /usr/local/bin/java [01/31/14 11:11:59] [SSH] Checking java version of /usr/local/java/bin/java Couldn't figure out the Java version of /usr/local/java/bin/java [01/31/14 11:11:59] [SSH] Checking java version of /zfs-data/jenkins/jdk/bin/java Couldn't figure out the Java version of /zfs-data/jenkins/jdk/bin/java 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, /zfs-data/jenkins/jdk/bin/java], and we also failed to install JDK as a fallback at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:657) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:593) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:228) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) Caused by: java.io.IOException: Failed to run 'uname' to obtain the environment at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:727) at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:655) ... 7 more [01/31/14 11:11:59] [SSH] Connection closed. ------
    via by Damien Nozay,
  • snip from my config.xml ------ <slaves> <slave> <name>jenkins-slave1.prod</name> <description></description> <remoteFS>/zfs-data/jenkins</remoteFS> <numExecutors>4</numExecutors> <mode>NORMAL</mode> <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/> <launcher class="hudson.plugins.sshslaves.SSHLauncher" plugin="ssh-slaves@1.5"> <host>jenkins-slave1.[REDACTED].com</host> <port>22</port> <credentialsId>[REDACTED]</credentialsId> </launcher> <label>linux centos slave</label> <nodeProperties/> <userId>damien</userId> </slave> </slaves> ------ I created a slave, and I am trying to connect it. This is a brand new installation. Here is the info on the slave: ------ [root@jenkins-slave1 ~]# uname -a Linux jenkins-slave1.[REDACTED].com 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux [root@jenkins-slave1 ~]# /usr/bin/java -version java version "1.6.0_30" OpenJDK Runtime Environment (IcedTea6 1.13.1) (rhel-3.1.13.1.el6_5-x86_64) OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode) ------ however when trying to connect the node it cannot find java: ------ [01/31/14 11:11:58] [SSH] Opening SSH connection to jenkins-slave1.[REDACTED].com:22. [01/31/14 11:11:59] [SSH] Authentication successful. [01/31/14 11:11:59] [SSH] The remote users environment is: [01/31/14 11:11:59] [SSH] Checking java version of java Couldn't figure out the Java version of java [01/31/14 11:11:59] [SSH] Checking java version of /usr/bin/java Couldn't figure out the Java version of /usr/bin/java [01/31/14 11:11:59] [SSH] Checking java version of /usr/java/default/bin/java Couldn't figure out the Java version of /usr/java/default/bin/java [01/31/14 11:11:59] [SSH] Checking java version of /usr/java/latest/bin/java Couldn't figure out the Java version of /usr/java/latest/bin/java [01/31/14 11:11:59] [SSH] Checking java version of /usr/local/bin/java Couldn't figure out the Java version of /usr/local/bin/java [01/31/14 11:11:59] [SSH] Checking java version of /usr/local/java/bin/java Couldn't figure out the Java version of /usr/local/java/bin/java [01/31/14 11:11:59] [SSH] Checking java version of /zfs-data/jenkins/jdk/bin/java Couldn't figure out the Java version of /zfs-data/jenkins/jdk/bin/java 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, /zfs-data/jenkins/jdk/bin/java], and we also failed to install JDK as a fallback at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:657) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:593) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:228) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) Caused by: java.io.IOException: Failed to run 'uname' to obtain the environment at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:727) at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:655) ... 7 more [01/31/14 11:11:59] [SSH] Connection closed. ------
    via by Damien Nozay,
  • Currently I install a recent JDK on every machine we add to our Hudson as a slave. As this number grows and as new Java versions are being released I intended reconfigure the machines to use the JDK from a configured tool location. I started with the AIX machines and failed immediately: AIX aixrds04 3 5 XXXXXXXXXXXX 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, /RDS/HUDSON/jdk/bin/java, /opt/fun/JDK/bin/java], and we also failed to install JDK as a fallback at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:230) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:184) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:184) 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) Caused by: java.io.IOException: Failed to detect the environment for automatic JDK installation. Please report this to users@hudson.dev.java.net: AIX aixrds04 3 5 XXXXXXXXXXXX at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:281) at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:228) ... 7 more Reviewing SSHLauncher.java I found a possible quick fix and think there should be time to also review the whole "mechanic" to make it right ... 1) The possible quick fix would be to prepend (!) the slave's JAVA_HOME env property to the javas list (in SSHLauncher$DefaultJavaProvider.getJavas()). This way I could install the JDKs on some NFS drive and be sure they will be found before any random matching java which might be installed on the system. 2) The right solution would of cause be to enable SSHLauncher.attemptToInstallJDK() to also support JDK installations on AIX, and - for me at least - also HP-UX. It would be sufficient to be able to provide a zip on the master which just gets unzipped on the slave, then. No need for fancy platform/cpu detection code. BTW: For HP-UX on PA-RISC the "uname -a" output is "HP-UX hprds2t B.11.23 U 9000/800 0000000000 unlimited-user license" and on Itanium it is "HP-UX hprds6t B.11.31 U ia64 0000000000 unlimited-user license"... Thanks -- Matthias Kraft
    via by Matthias Kraft,
  • I've seen the issue as resolved (at least twice), but it still occurs for me. Despite having Java binary on slave and master, the SSH Slave plugin fails to find Java version. Error log: ==================== [07/16/13 10:48:00] [SSH] Opening SSH connection to [...]:22. [07/16/13 10:48:00] [SSH] Authentication successful. [07/16/13 10:48:00] [SSH] The remote users environment is: [07/16/13 10:48:00] [SSH] Checking java version of java Couldn't figure out the Java version of java [07/16/13 10:48:00] [SSH] Checking java version of /usr/bin/java Couldn't figure out the Java version of /usr/bin/java [07/16/13 10:48:00] [SSH] Checking java version of /usr/java/default/bin/java Couldn't figure out the Java version of /usr/java/default/bin/java [07/16/13 10:48:00] [SSH] Checking java version of /usr/java/latest/bin/java Couldn't figure out the Java version of /usr/java/latest/bin/java [07/16/13 10:48:00] [SSH] Checking java version of /usr/local/bin/java Couldn't figure out the Java version of /usr/local/bin/java [07/16/13 10:48:00] [SSH] Checking java version of /usr/local/java/bin/java Couldn't figure out the Java version of /usr/local/java/bin/java [07/16/13 10:48:00] [SSH] Checking java version of /bin/java Couldn't figure out the Java version of /bin/java 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, /bin/java], and we also failed to install JDK as a fallback at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:557) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:493) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:230) 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: Failed to detect the environment for automatic JDK installation. Please report this to jenkinsci-users@googlegroups.com: at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:654) at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:555) ... 7 more [07/16/13 10:48:00] [SSH] Connection closed.
    via by Waldek M,
  • I've seen the issue as resolved (at least twice), but it still occurs for me. Despite having Java binary on slave and master, the SSH Slave plugin fails to find Java version. Error log: ==================== [07/16/13 10:48:00] [SSH] Opening SSH connection to [...]:22. [07/16/13 10:48:00] [SSH] Authentication successful. [07/16/13 10:48:00] [SSH] The remote users environment is: [07/16/13 10:48:00] [SSH] Checking java version of java Couldn't figure out the Java version of java [07/16/13 10:48:00] [SSH] Checking java version of /usr/bin/java Couldn't figure out the Java version of /usr/bin/java [07/16/13 10:48:00] [SSH] Checking java version of /usr/java/default/bin/java Couldn't figure out the Java version of /usr/java/default/bin/java [07/16/13 10:48:00] [SSH] Checking java version of /usr/java/latest/bin/java Couldn't figure out the Java version of /usr/java/latest/bin/java [07/16/13 10:48:00] [SSH] Checking java version of /usr/local/bin/java Couldn't figure out the Java version of /usr/local/bin/java [07/16/13 10:48:00] [SSH] Checking java version of /usr/local/java/bin/java Couldn't figure out the Java version of /usr/local/java/bin/java [07/16/13 10:48:00] [SSH] Checking java version of /bin/java Couldn't figure out the Java version of /bin/java 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, /bin/java], and we also failed to install JDK as a fallback at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:557) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:493) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:230) 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: Failed to detect the environment for automatic JDK installation. Please report this to jenkinsci-users@googlegroups.com: at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:654) at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:555) ... 7 more [07/16/13 10:48:00] [SSH] Connection closed.
    via by Waldek M,
  • Currently I install a recent JDK on every machine we add to our Hudson as a slave. As this number grows and as new Java versions are being released I intended reconfigure the machines to use the JDK from a configured tool location. I started with the AIX machines and failed immediately: AIX aixrds04 3 5 XXXXXXXXXXXX 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, /RDS/HUDSON/jdk/bin/java, /opt/fun/JDK/bin/java], and we also failed to install JDK as a fallback at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:230) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:184) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:184) 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) Caused by: java.io.IOException: Failed to detect the environment for automatic JDK installation. Please report this to users@hudson.dev.java.net: AIX aixrds04 3 5 XXXXXXXXXXXX at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:281) at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:228) ... 7 more Reviewing SSHLauncher.java I found a possible quick fix and think there should be time to also review the whole "mechanic" to make it right ... 1) The possible quick fix would be to prepend (!) the slave's JAVA_HOME env property to the javas list (in SSHLauncher$DefaultJavaProvider.getJavas()). This way I could install the JDKs on some NFS drive and be sure they will be found before any random matching java which might be installed on the system. 2) The right solution would of cause be to enable SSHLauncher.attemptToInstallJDK() to also support JDK installations on AIX, and - for me at least - also HP-UX. It would be sufficient to be able to provide a zip on the master which just gets unzipped on the slave, then. No need for fancy platform/cpu detection code. BTW: For HP-UX on PA-RISC the "uname -a" output is "HP-UX hprds2t B.11.23 U 9000/800 0000000000 unlimited-user license" and on Itanium it is "HP-UX hprds6t B.11.31 U ia64 0000000000 unlimited-user license"... Thanks -- Matthias Kraft
    via by Matthias Kraft,
    • 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, /zfs-data/jenkins/jdk/bin/java], and we also failed to install JDK as a fallback at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:657) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:593) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:228) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) Caused by: java.io.IOException: Failed to run 'uname' to obtain the environment at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:727) at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:655) ... 7 more
    No Bugmate found.