Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-6441

Slaves can't find Java when using locale that doesn't use dot as decimal separator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • ssh-slaves-plugin
    • None
    • Win32 master running Hudson 1.356 and ssh-slaves 0.10, OSX and Linux ssh slaves

      Starting in version 0.10, Hudson can't find usable Java on our OSX and Linux slaves. Issue seems to be caused by the patch for issue #6005, which started using NumberFormat for parsing Java version. We happen to be using a locale (fi) that uses comma instead of dot for decimal sperator and thus parsing something like "1.6.0_17" given by "java -version" yields just 1.0, causing version check to fail.

      Log from trying to start OSX slave:
      [05/05/10 03:20:36] [SSH] Checking java version of java
      [05/05/10 03:20:37] [SSH] java -version returned 1.6.0_17.
      [05/05/10 03:20:37] [SSH] Checking java version of /usr/bin/java
      [05/05/10 03:20:37] [SSH] /usr/bin/java -version returned 1.6.0_17.
      [05/05/10 03:20:37] [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

      [05/05/10 03:20:37] [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

      [05/05/10 03:20:37] [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

      [05/05/10 03:20:37] [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

      [05/05/10 03:20:37] [SSH] Checking java version of /hudson/jdk/bin/java
      Couldn't figure out the Java version of /hudson/jdk/bin/java
      bash: /hudson/jdk/bin/java: No such file or directory

      Darwin name.domain.com 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386
      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, /hudson/jdk/bin/java], and we also failed to install JDK as a fallback
      at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:200)
      at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:183)
      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: java.io.IOException: Failed to detect the environment for automatic JDK installation. Please report this to users@hudson.dev.java.net: Darwin name.domain.com 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386

      at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:268)
      at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:198)
      ... 6 more
      [05/05/10 03:20:37] [SSH] Connection closed.

            kohsuke Kohsuke Kawaguchi
            atte_timonen atte_timonen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: