java.io.IOException: Cannot run program "/my/external/program" (in directory "/tmp/aaa"): error=2, No such file or directory

Jenkins JIRA | vjuranek | 5 months ago
  1. 0

    When external process is started and working directory doesn't exists, it fails with exception bellow and it's easy to overlook that process runs in non-existing directory (as the same exception is thrown when external program file doesn't exists, has wrong rights and many other reasons). It would be nice if process launcher checks that working directory exists before starting the process. {noformat} java.io.IOException: Cannot run program "/my/external/program" (in directory "/tmp/aaa"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:803) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at org.jenkinsci.plugins.radargun.NodeRunner.call(NodeRunner.java:35) at org.jenkinsci.plugins.radargun.NodeRunner.call(NodeRunner.java:11) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 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:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 10 more {noformat}

    Jenkins JIRA | 5 months ago | vjuranek
    java.io.IOException: Cannot run program "/my/external/program" (in directory "/tmp/aaa"): error=2, No such file or directory
  2. 0

    Plugin fails with java.io.IOException

    GitHub | 5 months ago | vjuranek
    java.io.IOException: Cannot run program "radargun-plugin/work/workspace/radargun3.0-test/radargun_master4296330238282102242.sh" (in directory "radargun-plugin/work/workspace/radargun3.0-test/tmp"): error=2, No such file or directory
  3. 0

    Cloning repository call git.exe

    GitHub | 2 years ago | Liryna
    hudson.plugins.git.GitException: Could not init /home/jenkins
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    jenkins build fail with adb not found

    Stack Overflow | 1 year ago | Dev
    java.io.IOException: Cannot run program "/var/lib/jenkins/tools/android-sdk/platform-tools/adb": error=2, No such file or directory
  6. 0

    Jenkins users - /bin/java?

    nabble.com | 8 months ago
    java.io.IOException: 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:248)
    3. java.lang.ProcessImpl.start(ProcessImpl.java:134)
    4. java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    4 frames
  3. Hudson
    Launcher$ProcStarter.start
    1. hudson.Proc$LocalProc.<init>(Proc.java:244)
    2. hudson.Proc$LocalProc.<init>(Proc.java:216)
    3. hudson.Launcher$LocalLauncher.launch(Launcher.java:803)
    4. hudson.Launcher$ProcStarter.start(Launcher.java:381)
    4 frames
  4. org.jenkinsci.plugins
    NodeRunner.call
    1. org.jenkinsci.plugins.radargun.NodeRunner.call(NodeRunner.java:35)
    2. org.jenkinsci.plugins.radargun.NodeRunner.call(NodeRunner.java:11)
    2 frames
  5. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames