mjava.io.IOException: Cannot run program "cmd" (in directory "d:\hudson\workspace\Test-BuildConf"): CreateProcess error=267, The directory name is invalid

jenkins-ci.org | 4 months ago
  1. 0

    Batch Task Plugin - hudson - Hudson Wiki

    hudson-ci.org | 1 year ago
    mjava.io.IOException: Cannot run program "cmd" (in directory "d:\hudson\workspace\Test-BuildConf"): CreateProcess error=267, The directory name is invalid
  2. 0

    Batch Task Plugin - Jenkins - Jenkins Wiki

    jenkins-ci.org | 4 months ago
    mjava.io.IOException: Cannot run program "cmd" (in directory "d:\hudson\workspace\Test-BuildConf"): CreateProcess error=267, The directory name is invalid
  3. 0

    I named my project from "AppName" to "App Name" but the batch tasks are still trying to execute the script in the old path so it can't find the script. Here's the exception: workspace $ /bin/sh -xe /tmp/hudson3200245917642124053.sh FATAL: command execution failed [8mha:AAAAWB+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=[0mjava.io.IOException: Cannot run program "/bin/sh" (in directory "/opt/hudson/jobs/AppName/workspace"): java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at hudson.Proc$LocalProc.<init>(Proc.java:149) at hudson.Proc$LocalProc.<init>(Proc.java:121) at hudson.Launcher$LocalLauncher.launch(Launcher.java:638) at hudson.Launcher$ProcStarter.start(Launcher.java:273) at hudson.Launcher$ProcStarter.join(Launcher.java:280) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:83) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58) at hudson.plugins.batch_task.BatchRun.run(BatchRun.java:295) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:124) Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) ... 10 more

    Jenkins JIRA | 6 years ago | tieTYT
    mjava.io.IOException: Cannot run program "/bin/sh" (in directory "/opt/hudson/jobs/AppName/workspace"): 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

    Hudson is started with the following batch script: @echo off set HUDSON_HOME=C:\Work\hudson\hudsonHome java -jar hudson.war --javaHome=C:\Program Files\Java\jdk1.6.0_18 --prefix=/hudson --httpPort=8080 --webroot=C:\Work\hudson\winstoneHome --logfile=C:\Work\hudson\hudson.log running at the command prompt this command I experience the following error: C:\Work\hudson>java -jar hudson-cli.jar -s http://localhost:8080/hudson dist-fork -l master date t [distfork8999019989670479689.tmp] $ date /t ERROR: Failed to execute a process ←[8mha:AAAAVx+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0m1W6NqK7pC2JmJgaGiiETYMzhAYpZIAARpDCAgBF2FTYYAAAAA==←[0mjava.io.IOException: Cannot run program "date" (in directory C:\Work\hudson\hudsonHome\distfork8999019989670479689.tmp"): CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:149) at hudson.Proc$LocalProc.<init>(Proc.java:121) at hudson.Launcher$LocalLauncher.launch(Launcher.java:633) at hudson.Launcher$ProcStarter.start(Launcher.java:268) at hudson.Launcher$ProcStarter.join(Launcher.java:275) at hudson.plugins.distfork.DistForkCommand$1.run(DistForkCommand.java:147) at hudson.plugins.distfork.DistForkTask$1.run(DistForkTask.java:70) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 10 more whereas running the command directly at the DOS prompt no errors are generated: C:\Work\hudson>date /t 14/03/2010 if I explicitely ask for a new Windows command interpreter instance all is fine: C:\Work\hudson>java -jar hudson-cli.jar -s http://localhost:8080/hudson dist-fork -l master cmd /c date /t [distfork58286187552956103.tmp] $ cmd /c date /t 14/03/2010 should dist-fork do this automagically? I also noticed the prompt decoration does not really work in the DOS window. It seems related to Groovy Shell: C:\Work\hudson>java -jar hudson-cli.jar -s http://localhost:8080/hudson groovysh ←[32mGroovy Shell←[0m (1.6.0, JVM: 1.6.0_18) Type '←[1mhelp←[0m' or '←[1m\h←[0m' for help. ------------------------------------------------------------------------------- ←[1mgroovy:←[0m000←[1m>←[0m quit C:\Work\hudson>

    Jenkins JIRA | 7 years ago | Andrea Barbieri
    mjava.io.IOException: Cannot run program "date" (in directory C:\Work\hudson\hudsonHome\distfork8999019989670479689.tmp"): CreateProcess error=2, The system cannot find the file specified
  6. 0

    I named my project from "AppName" to "App Name" but the batch tasks are still trying to execute the script in the old path so it can't find the script. Here's the exception: workspace $ /bin/sh -xe /tmp/hudson3200245917642124053.sh FATAL: command execution failed [8mha:AAAAWB+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=[0mjava.io.IOException: Cannot run program "/bin/sh" (in directory "/opt/hudson/jobs/AppName/workspace"): java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at hudson.Proc$LocalProc.<init>(Proc.java:149) at hudson.Proc$LocalProc.<init>(Proc.java:121) at hudson.Launcher$LocalLauncher.launch(Launcher.java:638) at hudson.Launcher$ProcStarter.start(Launcher.java:273) at hudson.Launcher$ProcStarter.join(Launcher.java:280) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:83) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58) at hudson.plugins.batch_task.BatchRun.run(BatchRun.java:295) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:124) Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) ... 10 more

    Jenkins JIRA | 6 years ago | tieTYT
    mjava.io.IOException: Cannot run program "/bin/sh" (in directory "/opt/hudson/jobs/AppName/workspace"): java.io.IOException: error=2, No such file or directory

    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

      CreateProcess error=267, The directory name is invalid

      at java.lang.ProcessImpl.create()
    2. Java RT
      ProcessBuilder.start
      1. java.lang.ProcessImpl.create(Native Method)
      2. java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
      3. java.lang.ProcessImpl.start(ProcessImpl.java:30)
      4. java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
      4 frames
    3. Hudson
      Launcher$RemoteLaunchCallable.call
      1. hudson.Proc$LocalProc.<init>(Proc.java:149)
      2. hudson.Proc$LocalProc.<init>(Proc.java:121)
      3. hudson.Launcher$LocalLauncher.launch(Launcher.java:633)
      4. hudson.Launcher$ProcStarter.start(Launcher.java:268)
      5. hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:778)
      6. hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:754)
      6 frames
    4. Hudson :: Remoting Layer
      Request$2.run
      1. hudson.remoting.UserRequest.perform(UserRequest.java:114)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      3. hudson.remoting.Request$2.run(Request.java:270)
      3 frames
    5. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      3. java.util.concurrent.FutureTask.run(FutureTask.java:138)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      6. java.lang.Thread.run(Thread.java:619)
      6 frames