java.io.IOException

tip

This is a bug in some versions of the Arduino IDE. Try updating to the version 1.6.12 or further.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Jenkins build failed for git repository path
    via Stack Overflow by Asif
    ,
  • 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.
    via by Navin I,
  • 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.
    via by Navin I,
    • java.io.IOException: Cannot run program "gradle" (in directory "/var/lib/jenkins/workspace/Base Metals"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at hudson.Proc$LocalProc.<init>(Proc.java:245) at hudson.Proc$LocalProc.<init>(Proc.java:214) at hudson.Launcher$LocalLauncher.launch(Launcher.java:846) at hudson.Launcher$ProcStarter.start(Launcher.java:384) at hudson.Launcher$ProcStarter.join(Launcher.java:395) at hudson.plugins.gradle.Gradle.performTask(Gradle.java:314) at hudson.plugins.gradle.Gradle.perform(Gradle.java:190) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1728) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:405) 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:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 16 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    151 more bugmates