java.io.IOException: Cannot run program "phing" (in directory "/Users/Shared/Jenkins/Home/jobs/php-template/workspace"): error=2, No such file or directory

Stack Overflow | mfink | 3 years ago
  1. 0

    Jenkins cannot run program "phing" - Phing command execution failed

    Stack Overflow | 3 years ago | mfink
    java.io.IOException: Cannot run program "phing" (in directory "/Users/Shared/Jenkins/Home/jobs/php-template/workspace"): error=2, No such file or directory
  2. 0

    [JENKINS-15406] When using gradlew, root build script field is not used to locate gradlew - Jenkins JIRA

    jenkins-ci.org | 7 months ago
    java.io.IOException: Cannot run program (in directory ): error=2, No such file or directory
  3. 0

    My gradle build works fine when I do it via the command prompt. While doing it via Jenkins, I get the following error: Started by user anonymous Building in workspace /var/lib/jenkins/jobs/unite/workspace [Gradle] - Launching build. [workspace] $ gradle build -b /run/media/navin/Data/GitRepositories/unite/build.gradle FATAL: command execution failed java.io.IOException: Cannot run program "gradle" (in directory "/var/lib/jenkins/jobs/unite/workspace"): 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$ProcStarter.join(Launcher.java:360) at hudson.plugins.gradle.Gradle.performTask(Gradle.java:236) at hudson.plugins.gradle.Gradle.perform(Gradle.java:118) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:784) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565) at hudson.model.Run.execute(Run.java:1670) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) 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) ... 16 more Build step 'Invoke Gradle script' changed build result to FAILURE Build step 'Invoke Gradle script' marked build as failure Collecting metadata... Metadata collection done. Finished: FAILURE Google searching showed the error could be because of not selecting the Gradle version http://stackoverflow.com/questions/8646762/cannot-run-program-gradle-in-jenkins But when I click the dropdown menu to select the Gradle version, there is no version number shown at all. There's just "Default". I'm using version 1.23 of the Gradle plugin, Firefox version 25, using Jenkins.war and starting it as sudo service jenkins start on localhost:8080. Using jdk1.7.0_45. This is my first install of Jenkins.

    Jenkins JIRA | 3 years ago | Navin I
    java.io.IOException: Cannot run program "gradle" (in directory "/var/lib/jenkins/jobs/unite/workspace"): error=2, No such file or directory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    My gradle build works fine when I do it via the command prompt. While doing it via Jenkins, I get the following error: Started by user anonymous Building in workspace /var/lib/jenkins/jobs/unite/workspace [Gradle] - Launching build. [workspace] $ gradle build -b /run/media/navin/Data/GitRepositories/unite/build.gradle FATAL: command execution failed java.io.IOException: Cannot run program "gradle" (in directory "/var/lib/jenkins/jobs/unite/workspace"): 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$ProcStarter.join(Launcher.java:360) at hudson.plugins.gradle.Gradle.performTask(Gradle.java:236) at hudson.plugins.gradle.Gradle.perform(Gradle.java:118) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:784) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565) at hudson.model.Run.execute(Run.java:1670) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) 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) ... 16 more Build step 'Invoke Gradle script' changed build result to FAILURE Build step 'Invoke Gradle script' marked build as failure Collecting metadata... Metadata collection done. Finished: FAILURE Google searching showed the error could be because of not selecting the Gradle version http://stackoverflow.com/questions/8646762/cannot-run-program-gradle-in-jenkins But when I click the dropdown menu to select the Gradle version, there is no version number shown at all. There's just "Default". I'm using version 1.23 of the Gradle plugin, Firefox version 25, using Jenkins.war and starting it as sudo service jenkins start on localhost:8080. Using jdk1.7.0_45. This is my first install of Jenkins.

    Jenkins JIRA | 3 years ago | Navin I
    java.io.IOException: Cannot run program "gradle" (in directory "/var/lib/jenkins/jobs/unite/workspace"): error=2, No such file or directory
  6. 0

    Jenkins job using Gradle can't find executable

    Stack Overflow | 2 years ago | ShatyUT
    java.io.IOException: Cannot run program "gradle" (in directory "/var/lib/jenkins/workspace/Journeyman-Android"): error=2, No such file or directory

  1. eti22 1 times, last 1 month ago
  2. asdasd 24 times, last 3 months ago
  3. rexgreenza 8 times, last 3 months ago
  4. Benj-AD 1 times, last 4 months ago
  5. Akshay 4 times, last 6 months ago
95 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    error=2, No such file or directory

    at java.lang.UNIXProcess.forkAndExec()
  2. Java RT
    ProcessBuilder.start
    1. java.lang.UNIXProcess.forkAndExec(Native Method)
    2. java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
    3. java.lang.ProcessImpl.start(ProcessImpl.java:130)
    4. java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
    4 frames
  3. Hudson
    Launcher$ProcStarter.join
    1. hudson.Proc$LocalProc.<init>(Proc.java:244)
    2. hudson.Proc$LocalProc.<init>(Proc.java:216)
    3. hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
    4. hudson.Launcher$ProcStarter.start(Launcher.java:353)
    5. hudson.Launcher$ProcStarter.join(Launcher.java:360)
    5 frames
  4. hudson.plugins.phing
    PhingBuilder.perform
    1. hudson.plugins.phing.PhingBuilder.perform(PhingBuilder.java:215)
    1 frame
  5. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
    3. hudson.model.Build$BuildExecution.build(Build.java:199)
    4. hudson.model.Build$BuildExecution.doRun(Build.java:160)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:585)
    6. hudson.model.Run.execute(Run.java:1670)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    8. hudson.model.ResourceController.execute(ResourceController.java:88)
    9. hudson.model.Executor.run(Executor.java:231)
    9 frames