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

Executing a Grails build on a remote node fails

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: grails-plugin
    • Labels:
    • Environment:
      Latest Jenkins and Grails Plugin.
      Git remote.
      Remote slave on AWS, ubuntu 13.10.
    • Similar Issues:

      Description

      Executing a grails build on a remote slave seems to fail in an odd way.

      The path to the grails command, or the grailsw command is incorrect.

      With the grails wrapper, this is what happens.

      -----------

      Started by user David Dawson
      Building remotely on Ubuntu 13.10 (i-2d823961) in workspace workspace/Grails - GWT Plugin Package
      Fetching changes from the remote Git repository
      Fetching upstream changes from https://github.com/simplicityitself/grails-gwt.git
      Checking out Revision c998432b9968ad627a624265354bd71623b2eff3 (origin/extended-dependency)
      [Grails - GWT Plugin Package] $ "workspace/Grails - GWT Plugin Package/grailsw" "-Dgrails.work.dir=/home/ubuntu/workspace/Grails - GWT Plugin Package//target" upgrade --non-interactive --plain-output --refresh-dependencies
      FATAL: command execution failed
      java.io.IOException: Cannot run program "workspace/Grails - GWT Plugin Package/grailsw" (in directory "workspace/Grails - GWT Plugin Package"): error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
      at hudson.Proc$LocalProc.<init>(Proc.java:244)
      at hudson.Proc$LocalProc.<init>(Proc.java:216)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
      at hudson.Launcher$ProcStarter.start(Launcher.java:353)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:998)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:965)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      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:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: java.io.IOException: error=2, No such file or directory
      at java.lang.UNIXProcess.forkAndExec(Native Method)
      at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
      at java.lang.ProcessImpl.start(ProcessImpl.java:130)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
      ... 15 more
      Build step 'Build With Grails' marked build as failure
      Finished: FAILURE

      ------------

      Note the path to the grails wrapper has the workspace name in it, even though it is being executed within the workspace.

      For an auto installed grails, this is what happens

      ------------

      Started by user David Dawson
      Building remotely on Ubuntu 13.10 (i-2d823961) in workspace workspace/Grails - GWT Plugin Package
      Fetching changes from the remote Git repository
      Fetching upstream changes from https://github.com/simplicityitself/grails-gwt.git
      Checking out Revision c998432b9968ad627a624265354bd71623b2eff3 (origin/extended-dependency)
      Unpacking http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.3.1.zip to tools/com.g2one.hudson.grails.GrailsInstallation/2.3.1 on Ubuntu 13.10 (i-2d823961)
      [Grails - GWT Plugin Package] $ tools/com.g2one.hudson.grails.GrailsInstallation/2.3.1/bin/grails "-Dgrails.work.dir=/home/ubuntu/workspace/Grails - GWT Plugin Package//target" upgrade --non-interactive --plain-output --refresh-dependencies
      FATAL: command execution failed
      java.io.IOException: Cannot run program "tools/com.g2one.hudson.grails.GrailsInstallation/2.3.1/bin/grails" (in directory "workspace/Grails - GWT Plugin Package"): error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
      at hudson.Proc$LocalProc.<init>(Proc.java:244)
      at hudson.Proc$LocalProc.<init>(Proc.java:216)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
      at hudson.Launcher$ProcStarter.start(Launcher.java:353)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:998)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:965)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      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:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: java.io.IOException: error=2, No such file or directory
      at java.lang.UNIXProcess.forkAndExec(Native Method)
      at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
      at java.lang.ProcessImpl.start(ProcessImpl.java:130)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
      ... 15 more
      Build step 'Build With Grails' marked build as failure
      Finished: FAILURE

      --------------

      Note the relative path in use.

      Effectively, I can't get this to work on a remote slave. Workarounds, fixes or suggestions on how I've done this wrong welcome.

      I can give access to the jenkins master that this is happening on if that helps.

        Attachments

          Activity

            People

            • Assignee:
              jeffg2one jeffg2one
              Reporter:
              david_dawson David Dawson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: