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

slave setup tries to install the wrong JDK version and fails to parse oracle.com website response

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • ssh-slaves-plugin
    • None
    • Windows 2008 Server master to Linux based slave.
      Alexey: I have the same problem with CentOS Master - CentOS slave.

      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.

            kohsuke Kohsuke Kawaguchi
            sebtardif Sebastien Tardif
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: