java.io.IOException: Cannot run program "chmod": java.io.IOException: error=2, No such file or directory

Jenkins JIRA | Angela Johansson | 5 years ago
  1. 0

    After the latest upgrade, all our builds fail with the following error in the console output: {code} ERROR: Publisher hudson.tasks.ArtifactArchiver aborted due to exception Execute failed: java.io.IOException: Cannot run program "chmod": java.io.IOException: error=2, No such file or directory at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:491) at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:502) at org.apache.tools.ant.taskdefs.Chmod.execute(Chmod.java:181) at hudson.FilePath._chmodAnt(FilePath.java:1119) at hudson.FilePath._chmod(FilePath.java:1104) at hudson.FilePath.readFromTar(FilePath.java:1644) at hudson.FilePath.copyRecursiveTo(FilePath.java:1566) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635) at hudson.model.Build$RunnerImpl.post2(Build.java:161) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604) at hudson.model.Run.run(Run.java:1400) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:175) Caused by: java.io.IOException: Cannot run program "chmod": java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:827) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:445) at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:459) at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:635) at org.apache.tools.ant.taskdefs.ExecuteOn.runParallel(ExecuteOn.java:711) at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:479) ... 17 more Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 25 more {code}

    Jenkins JIRA | 5 years ago | Angela Johansson
    java.io.IOException: Cannot run program "chmod": java.io.IOException: error=2, No such file or directory
  2. 0

    After the latest upgrade, all our builds fail with the following error in the console output: {code} ERROR: Publisher hudson.tasks.ArtifactArchiver aborted due to exception Execute failed: java.io.IOException: Cannot run program "chmod": java.io.IOException: error=2, No such file or directory at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:491) at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:502) at org.apache.tools.ant.taskdefs.Chmod.execute(Chmod.java:181) at hudson.FilePath._chmodAnt(FilePath.java:1119) at hudson.FilePath._chmod(FilePath.java:1104) at hudson.FilePath.readFromTar(FilePath.java:1644) at hudson.FilePath.copyRecursiveTo(FilePath.java:1566) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635) at hudson.model.Build$RunnerImpl.post2(Build.java:161) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604) at hudson.model.Run.run(Run.java:1400) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:175) Caused by: java.io.IOException: Cannot run program "chmod": java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:827) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:445) at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:459) at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:635) at org.apache.tools.ant.taskdefs.ExecuteOn.runParallel(ExecuteOn.java:711) at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:479) ... 17 more Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 25 more {code}

    Jenkins JIRA | 5 years ago | Angela Johansson
    java.io.IOException: Cannot run program "chmod": java.io.IOException: error=2, No such file or directory
  3. 0

    ${platforms.JDK_1.6.home}/bin/java": java.io.IOException: error=2

    Stack Overflow | 2 years ago
    java.io.IOException: Cannot run program "${platforms.JDK_1.6.home}/bin/java": java.io.IOException: error=2, No such file or directory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Runtime.getRuntime().exec("cd") returns java.io.IOException, error 2 in java

    linuxquestions.org | 8 months ago
    java.io.IOException: Cannot run program "cd": java.io.IOException: error=2, No such file or directory
  6. 0

    GitHub comment 6#11567809

    GitHub | 4 years ago | Sworddragon
    java.io.IOException: Cannot run program "apt" (in directory "/home/sworddragon/.git/lwjgl/src/templates/org/lwjgl/openal"): java.io.IOException: error=2, No such file or directory

  1. serious2monkeys 1 times, last 1 week ago
  2. Handemelindo 6 times, last 1 month ago
  3. kid 5 times, last 1 month ago
  4. rp 2 times, last 2 months ago
  5. jk 1 times, last 5 months ago
3 more registered users
75 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

    java.io.IOException: error=2, No such file or directory

    at java.lang.UNIXProcess.<init>()
  2. Java RT
    Runtime.exec
    1. java.lang.UNIXProcess.<init>(Unknown Source)
    2. java.lang.ProcessImpl.start(Unknown Source)
    3. java.lang.ProcessBuilder.start(Unknown Source)
    4. java.lang.Runtime.exec(Unknown Source)
    4 frames
  3. Ant
    Chmod.execute
    1. org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:827)
    2. org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:445)
    3. org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:459)
    4. org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:635)
    5. org.apache.tools.ant.taskdefs.ExecuteOn.runParallel(ExecuteOn.java:711)
    6. org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:479)
    7. org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:502)
    8. org.apache.tools.ant.taskdefs.Chmod.execute(Chmod.java:181)
    8 frames
  4. Hudson
    Executor.run
    1. hudson.FilePath._chmodAnt(FilePath.java:1119)
    2. hudson.FilePath._chmod(FilePath.java:1104)
    3. hudson.FilePath.readFromTar(FilePath.java:1644)
    4. hudson.FilePath.copyRecursiveTo(FilePath.java:1566)
    5. hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116)
    6. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    7. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682)
    8. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657)
    9. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635)
    10. hudson.model.Build$RunnerImpl.post2(Build.java:161)
    11. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604)
    12. hudson.model.Run.run(Run.java:1400)
    13. hudson.matrix.MatrixRun.run(MatrixRun.java:146)
    14. hudson.model.ResourceController.execute(ResourceController.java:88)
    15. hudson.model.Executor.run(Executor.java:175)
    15 frames