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

Cannot create/start slave using SSH with master and slave running windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • ssh-slaves-plugin
    • None
    • Master running Windows Server 2003 R2 Enterprise X64
      Slave running Windows Server 2008 R2 Standard X64

      This bug may be related to 6441.

      Repro steps:

      1. On the slave-to-be, install ssh server - I used OpenSSH
      2. On the master, create slave using SSH as control/connection method
      3. Start slave

      Note:
      1. On the master, I have defined JDK versions 1.6.0 Update 16, 17, 18 and 20, with 20 set to automatic download.
      2. Both master and slave has locale set to English (US), with decimal separator set to "."

      Result:

      [06/20/10 23:16:54] [SSH] Checking java version of java Couldn't figure out the Java version of java bash: java: command not found [06/20/10 23:16:55] [SSH] Checking java version of /usr/bin/java
      Couldn't figure out the Java version of /usr/bin/java bash: /usr/bin/java: No such file or directory [06/20/10 23:16:55] [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 [06/20/10 23:16:56] [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 [06/20/10 23:16:57] [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 [06/20/10 23:16:58] [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 [06/20/10 23:16:58] [SSH] Checking java version of C:\hudson/jdk/bin/java
      Couldn't figure out the Java version of C:\hudson/jdk/bin/java bash: C:hudson/jdk/bin/java: No such file or directory CYGWIN_NT-6.1-WOW64 qa-loadtest01 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 Cygwin
      Choosing the download bundle Downloading JDK6u16
      Installing C:\hudson/jdk.exe [jdk] $ C:\hudson/jdk.exe /s '/v/qn REBOOT=Suppress INSTALLDIR=\"C:\hudson/jdk\" /L \"C:\hudson/jdk.exe.install.log\"' bash: C:hudson/jdk.exe: No such file or directory Failed to install JDK 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, C:\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(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: com.trilead.ssh2.SFTPException: No such file (SSH_FX_NO_SUCH_FILE: A reference was made to a file which does not exist.) at com.trilead.ssh2.SFTPv3Client.openFile(SFTPv3Client.java:1202) at com.trilead.ssh2.SFTPv3Client.openFileRO(SFTPv3Client.java:1024) at hudson.plugins.sshslaves.SFTPClient.read(SFTPClient.java:91) at hudson.plugins.sshslaves.SFTPFileSystem.read(SFTPFileSystem.java:33) at hudson.tools.JDKInstaller.install(JDKInstaller.java:210) at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:285) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:198) ... 6 more [06/20/10 23:18:23] [SSH] Connection closed.

      Expected: JDK 1.6.0 update 20 to be downloaded and installed, and the slave to start.

      Some observations:
      1. Based on this line in the log from the slave startup:
      [06/20/10 23:31:59] [SSH] Checking java version of C:\hudson/jdk/bin/java
      Couldn't figure out the Java version of C:\hudson/jdk/bin/java
      bash: C:hudson/jdk/bin/java: No such file or directory

      It seems as if Hudson is not escaping the backslash properly.
      Even if I explicitly install a jdk in C:\hudson\jdk, it won't find it.

      2. It seems as if Hudson is not honoring the setting of JDK version of the master since it looks as if it is always trying to download JDK6u16:
      CYGWIN_NT-6.1-WOW64 qa-loadtest01 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 Cygwin
      Choosing the download bundle
      Downloading JDK6u16
      Installing C:\hudson/jdk.exe
      [jdk] $ C:\hudson/jdk.exe /s '/v/qn REBOOT=Suppress INSTALLDIR=\"C:\hudson/jdk\" /L \"C:\hudson/jdk.exe.install.log\"'
      bash: C:hudson/jdk.exe: No such file or directory

      and then we have the same issue with escaping of backslash.

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

              Created:
              Updated:
              Resolved: