java.io.IOException: Cannot run program "/bin/bash" (in directory "C:\Hudson\workspace\spectrum_tap2"): CreateProcess error=3, The system cannot find the path specified

Jenkins JIRA | sauravsengupta | 6 years ago
  1. 0

    It looks like either cygpath sometimes does not return the right information, or Hudson does not use the cygpath information to find /bin/bash. The log snippet below shows a few things: * Timing - It found bash twice within 10 seconds, and then the 3rd time it failed to find it * When it worked, Hudson called C:\cygwin\bin\bash. When it failed, Hudson called /bin/bash. This is what makes me think that it didn't use the cygpath value I found one thread in the forums which suggested just using bash instead of /bin/bash in the shell environment variable. Would that take care of something like this? The two success cases: {code} 09:56:19 $ C:\cygwin\bin\cygpath -w /bin/bash 09:56:19 [spectrum_tap2] $ C:\cygwin\bin\bash -xe C:\DOCUME~1\OR-ENG~1\LOCALS~1\Temp\hudson3300316933213918666.sh ... 09:56:19 $ C:\cygwin\bin\cygpath -w /bin/bash 09:56:20 [spectrum_tap2] $ C:\cygwin\bin\bash -xe C:\DOCUME~1\OR-ENG~1\LOCALS~1\Temp\hudson2834466993129794225.sh 09:56:20 + '[' '' '!=' true ']' 09:56:20 + echo 'Build description: Build skipped' 09:56:20 Build description: Build skipped {code} And the failure, 3 seconds later: {code} 09:56:23 $ C:\cygwin\bin\cygpath -w /bin/bash 09:56:27 [spectrum_tap2] $ /bin/bash -xe C:\DOCUME~1\OR-ENG~1\LOCALS~1\Temp\hudson5829219388252082290.sh 09:56:29 FATAL: command execution failed 09:56:29 java.io.IOException: Cannot run program "/bin/bash" (in directory "C:\Hudson\workspace\spectrum_tap2"): CreateProcess error=3, The system cannot find the path specified 09:56:29 at java.lang.ProcessBuilder.start(Unknown Source) 09:56:29 at hudson.Proc$LocalProc.<init>(Proc.java:192) 09:56:29 at hudson.Proc$LocalProc.<init>(Proc.java:164) 09:56:29 at hudson.Launcher$LocalLauncher.launch(Launcher.java:638) 09:56:29 at hudson.Launcher$ProcStarter.start(Launcher.java:273) 09:56:29 at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:793) 09:56:29 at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:767) 09:56:29 at hudson.remoting.UserRequest.perform(UserRequest.java:114) 09:56:29 at hudson.remoting.UserRequest.perform(UserRequest.java:48) 09:56:29 at hudson.remoting.Request$2.run(Request.java:270) 09:56:29 at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 09:56:29 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 09:56:29 at java.util.concurrent.FutureTask.run(Unknown Source) 09:56:29 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) 09:56:29 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 09:56:29 at hudson.remoting.Engine$1$1.run(Engine.java:58) 09:56:29 at java.lang.Thread.run(Unknown Source) 09:56:29 Caused by: java.io.IOException: CreateProcess error=3, The system cannot find the path specified 09:56:29 at java.lang.ProcessImpl.create(Native Method) 09:56:29 at java.lang.ProcessImpl.<init>(Unknown Source) 09:56:29 at java.lang.ProcessImpl.start(Unknown Source) 09:56:29 ... 17 more {code} I don't know what component this should be, so I set it to 'core'.

    Jenkins JIRA | 6 years ago | sauravsengupta
    java.io.IOException: Cannot run program "/bin/bash" (in directory "C:\Hudson\workspace\spectrum_tap2"): CreateProcess error=3, The system cannot find the path specified
  2. 0

    It looks like either cygpath sometimes does not return the right information, or Hudson does not use the cygpath information to find /bin/bash. The log snippet below shows a few things: * Timing - It found bash twice within 10 seconds, and then the 3rd time it failed to find it * When it worked, Hudson called C:\cygwin\bin\bash. When it failed, Hudson called /bin/bash. This is what makes me think that it didn't use the cygpath value I found one thread in the forums which suggested just using bash instead of /bin/bash in the shell environment variable. Would that take care of something like this? The two success cases: {code} 09:56:19 $ C:\cygwin\bin\cygpath -w /bin/bash 09:56:19 [spectrum_tap2] $ C:\cygwin\bin\bash -xe C:\DOCUME~1\OR-ENG~1\LOCALS~1\Temp\hudson3300316933213918666.sh ... 09:56:19 $ C:\cygwin\bin\cygpath -w /bin/bash 09:56:20 [spectrum_tap2] $ C:\cygwin\bin\bash -xe C:\DOCUME~1\OR-ENG~1\LOCALS~1\Temp\hudson2834466993129794225.sh 09:56:20 + '[' '' '!=' true ']' 09:56:20 + echo 'Build description: Build skipped' 09:56:20 Build description: Build skipped {code} And the failure, 3 seconds later: {code} 09:56:23 $ C:\cygwin\bin\cygpath -w /bin/bash 09:56:27 [spectrum_tap2] $ /bin/bash -xe C:\DOCUME~1\OR-ENG~1\LOCALS~1\Temp\hudson5829219388252082290.sh 09:56:29 FATAL: command execution failed 09:56:29 java.io.IOException: Cannot run program "/bin/bash" (in directory "C:\Hudson\workspace\spectrum_tap2"): CreateProcess error=3, The system cannot find the path specified 09:56:29 at java.lang.ProcessBuilder.start(Unknown Source) 09:56:29 at hudson.Proc$LocalProc.<init>(Proc.java:192) 09:56:29 at hudson.Proc$LocalProc.<init>(Proc.java:164) 09:56:29 at hudson.Launcher$LocalLauncher.launch(Launcher.java:638) 09:56:29 at hudson.Launcher$ProcStarter.start(Launcher.java:273) 09:56:29 at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:793) 09:56:29 at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:767) 09:56:29 at hudson.remoting.UserRequest.perform(UserRequest.java:114) 09:56:29 at hudson.remoting.UserRequest.perform(UserRequest.java:48) 09:56:29 at hudson.remoting.Request$2.run(Request.java:270) 09:56:29 at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 09:56:29 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 09:56:29 at java.util.concurrent.FutureTask.run(Unknown Source) 09:56:29 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) 09:56:29 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 09:56:29 at hudson.remoting.Engine$1$1.run(Engine.java:58) 09:56:29 at java.lang.Thread.run(Unknown Source) 09:56:29 Caused by: java.io.IOException: CreateProcess error=3, The system cannot find the path specified 09:56:29 at java.lang.ProcessImpl.create(Native Method) 09:56:29 at java.lang.ProcessImpl.<init>(Unknown Source) 09:56:29 at java.lang.ProcessImpl.start(Unknown Source) 09:56:29 ... 17 more {code} I don't know what component this should be, so I set it to 'core'.

    Jenkins JIRA | 6 years ago | sauravsengupta
    java.io.IOException: Cannot run program "/bin/bash" (in directory "C:\Hudson\workspace\spectrum_tap2"): CreateProcess error=3, The system cannot find the path specified
  3. 0

    Build failed in Hudson: OpenEngSB #576

    Google Groups | 6 years ago | Unknown author
    java.io.IOException: Cannot run program "C:\hudson\tools\jdk.exe" (in directory "C:\hudson\tools"): CreateProcess error=32, The process cannot access the file because it is being used by another process
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    jdk install via jenkins doesn't work???

    Google Groups | 5 years ago | phil swenson
    java.io.IOException: Cannot run program "D:/jenkins/work/tools/jdk6/jdk.exe" (in directory "D:\jenkins\work\tools\jdk6"): CreateProcess error=87, The parameter is incorrect
  6. 0

    hg clone fails, hg pull succeeds

    Google Groups | 5 years ago | Ron
    java.io.IOException: Cannot run program "hg" (in directory "c:\jenkins\workspace\Sonar"): CreateProcess error=267, The directory name is invalid
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=3, The system cannot find the path specified

    at java.lang.ProcessImpl.create()
  2. Java RT
    ProcessBuilder.start
    1. java.lang.ProcessImpl.create(Native Method)
    2. java.lang.ProcessImpl.<init>(Unknown Source)
    3. java.lang.ProcessImpl.start(Unknown Source)
    4. java.lang.ProcessBuilder.start(Unknown Source)
    4 frames
  3. Hudson
    Launcher$RemoteLaunchCallable.call
    1. hudson.Proc$LocalProc.<init>(Proc.java:192)
    2. hudson.Proc$LocalProc.<init>(Proc.java:164)
    3. hudson.Launcher$LocalLauncher.launch(Launcher.java:638)
    4. hudson.Launcher$ProcStarter.start(Launcher.java:273)
    5. hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:793)
    6. hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:767)
    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
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    2. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    3. java.util.concurrent.FutureTask.run(Unknown Source)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    5. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    5 frames
  6. Hudson :: Remoting Layer
    Engine$1$1.run
    1. hudson.remoting.Engine$1$1.run(Engine.java:58)
    1 frame
  7. Java RT
    Thread.run
    1. java.lang.Thread.run(Unknown Source)
    1 frame