Skip to content

[JENKINS-6880] Automatically installing JDK in mixed environment fails #1000

Closed

Description

@jenkins-infra-bot

When starting a maven 2 build the slave fails installing the JDK. I've tried several versions from update 17-20 and they all fail with equal errors.

Reason seems incorrect path building by the master as the working dir is set in Windows style instead of *nix style. (backslashes against forward slashes). Please see build log below. The jdk.sh install file is downloaded to the slave & when manually run, gives no error at all. Of course, on the next build the JDK get's reinstalled & fails once more.

Started by user anonymous
Building remotely on work7203 (ssh)
Updating svn://10.72.20.100/StepII/trunk
At revision 22552
no change for svn://10.72.20.100/StepII/trunk since the previous build
Downloading file:/C:/Documents and Settings/Default User/.hudson/cache/jdks/LINUX/amd64/jdk-6u20-oth-JPR@​CDS-CDS_Developer
Installing /home/hudson/tools/JDK1.6.0_20/jdk.sh
[JDK1.6.0_20] $ /home/hudson/tools/JDK1.6.0_20/jdk.sh -noregister
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "/home/hudson/tools/JDK1.6.0_20/jdk.sh" (in directory "\home\hudson\tools\JDK1.6.0_20"): java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at hudson.Proc$LocalProc.(Proc.java:192)
at hudson.Proc$LocalProc.(Proc.java:164)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:638)
at hudson.Launcher$ProcStarter.start(Launcher.java:273)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:793)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:767)
at hudson.remoting.UserRequest.perform(UserRequest.java:114)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
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: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 15 more
Sending e-mails to: *************
Finished: FAILURE


Originally reported by jeroen_muis, imported from: Automatically installing JDK in mixed environment fails
  • assignee: mindless
  • status: Closed
  • priority: Major
  • component(s): remoting
  • resolution: Fixed
  • resolved: 2010-07-28T08:01:07+00:00
  • votes: 1
  • watchers: 2
  • imported: 2025-11-25
Raw content of original issue

When starting a maven 2 build the slave fails installing the JDK. I've tried several versions from update 17-20 and they all fail with equal errors.

Reason seems incorrect path building by the master as the working dir is set in Windows style instead of *nix style. (backslashes against forward slashes). Please see build log below. The jdk.sh install file is downloaded to the slave & when manually run, gives no error at all. Of course, on the next build the JDK get's reinstalled & fails once more.

Started by user anonymous Building remotely on work7203 (ssh) Updating svn://10.72.20.100/StepII/trunk At revision 22552 no change for svn://10.72.20.100/StepII/trunk since the previous build Downloading file:/C:/Documents and Settings/Default User/.hudson/cache/jdks/LINUX/amd64/jdk-6u20-oth-JPR@CDS-CDS_Developer Installing /home/hudson/tools/JDK1.6.0_20/jdk.sh [JDK1.6.0_20] $ /home/hudson/tools/JDK1.6.0_20/jdk.sh -noregister ERROR: Failed to parse POMs java.io.IOException: Cannot run program "/home/hudson/tools/JDK1.6.0_20/jdk.sh" (in directory "\home\hudson\tools\JDK1.6.0_20"): java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at hudson.Proc$LocalProc.<init>(Proc.java:192) at hudson.Proc$LocalProc.<init>(Proc.java:164) at hudson.Launcher$LocalLauncher.launch(Launcher.java:638) at hudson.Launcher$ProcStarter.start(Launcher.java:273) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:793) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:767) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) 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: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) ... 15 more Sending e-mails to: ************* Finished: FAILURE

environment
Master=Windows 2003 x86 <br/>
Slave=Ubuntu Linux x64 (ssh connected)
1 attachment

Activity

  1. jenkins-infra-bot commented on Jul 17, 2010

    @jenkins-infra-bot
    Author
    jeroen_muis:
    • Original comment link
    • Raw content of original comment:

      Problem is due to Windows Filepath settings. Instead of calling the remote working directory path the path is set by a call to the master java.io.File instance. On Windows this resolves to '\' instead of '/' crashing the install on Linux slaves.

      Fixed by querying a FilePath instance on the slave. Attached patch file.

    Problem is due to Windows Filepath settings.
    Instead of calling the remote working directory path the path is set by a call to the master java.io.File instance. On Windows this resolves to '\' instead of '/' crashing the install on Linux slaves.

    Fixed by querying a FilePath instance on the slave. Attached patch file.

  2. jenkins-infra-bot commented on Jul 17, 2010

    @jenkins-infra-bot
    Author
    jeroen_muis:
    • Original comment link
    • Raw content of original comment:

      Please review patch and apply. Thanks, Jeroen

    Please review patch and apply.
    Thanks,
    Jeroen

  3. jenkins-infra-bot commented on Jul 21, 2010

    @jenkins-infra-bot
    Author
    mindless:
    • Original comment link
    • Raw content of original comment:

      Thanks.. presumably a linux master with windows slave would have a similar problem, so I'll use FilePath in the WINDOWS case too.

    Thanks.. presumably a linux master with windows slave would have a similar problem, so I'll use FilePath in the WINDOWS case too.

  4. jenkins-infra-bot commented on Jul 28, 2010

    @jenkins-infra-bot
    Author
    mindless:
    • Original comment link
    • Raw content of original comment:

      r33136 | mindless | 2010-07-21 16:41:15 -0600 (Wed, 21 Jul 2010) Changed paths: M /trunk/hudson/main/core/src/main/java/hudson/tools/JDKInstaller.java M /trunk/www/changelog.html

      [FIXED JENKINS-6880] patch from jeroen_muis to fix autoinstall of JDK with windows master and linux slave. I applied same change for reverse situation.

    r33136 | mindless | 2010-07-21 16:41:15 -0600 (Wed, 21 Jul 2010)
    Changed paths:
    M /trunk/hudson/main/core/src/main/java/hudson/tools/JDKInstaller.java
    M /trunk/www/changelog.html

    [FIXED JENKINS-6880] patch from jeroen_muis to fix autoinstall of JDK with
    windows master and linux slave. I applied same change for reverse situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions