com.atlassian.utils.process.ProcessException: java.io.IOException: Cannot run program "/bin/sh" (in directory "/Users/brydie/dev/src/bamboo-hg/bamboo-homes/8085/xml-data/build-dir/113311745/REPO-P4MULTI-JOB1"): error=2, No such file or directory

Atlassian JIRA | Brydie McCoy [Atlassian] | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Ideal Soultions # The option should be removed when using perforce. # The option should look to the perforce checkout dir (as it did pre-multiple repos) However, in the mean time it would be good if the build failed elegently. {code} 2011-12-08 14:45:57,993 INFO [2-BAM::qwerty::Agent:pool-8-thread-1] [TaskResultBuilder] Process exception: com.atlassian.utils.process.ProcessException: java.io.IOException: Cannot run program "/bin/sh" (in directory "/Users/brydie/dev/src/bamboo-hg/bamboo-homes/8085/xml-data/build-dir/113311745/REPO-P4MULTI-JOB1"): error=2, No such file or directory at com.atlassian.utils.process.ExternalProcess.start(ExternalProcess.java:286) at com.atlassian.utils.process.ExternalProcess.execute(ExternalProcess.java:408) at com.atlassian.bamboo.process.ProcessServiceImpl.executeProcess(ProcessServiceImpl.java:176) at com.atlassian.bamboo.plugins.shell.task.AbstractShellBuildTask.execute(AbstractShellBuildTask.java:62) at com.atlassian.bamboo.plugins.script.task.ScriptBuildTask.execute(ScriptBuildTask.java:53) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:180) at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:88) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:84) at sun.reflect.GeneratedMethodAccessor319.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy484.call(Unknown Source) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:198) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:107) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50) at java.lang.Thread.run(Thread.java:680) Caused by: java.io.IOException: Cannot run program "/bin/sh" (in directory "/Users/brydie/dev/src/bamboo-hg/bamboo-homes/8085/xml-data/build-dir/113311745/REPO-P4MULTI-JOB1"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at com.atlassian.utils.process.ExternalProcess.createProcess(ExternalProcess.java:245) at com.atlassian.utils.process.ExternalProcess.start(ExternalProcess.java:283) ... 22 more 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:53) at java.lang.ProcessImpl.start(ProcessImpl.java:91) at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) ... 24 more {code}

    Atlassian JIRA | 5 years ago | Brydie McCoy [Atlassian]
    com.atlassian.utils.process.ProcessException: java.io.IOException: Cannot run program "/bin/sh" (in directory "/Users/brydie/dev/src/bamboo-hg/bamboo-homes/8085/xml-data/build-dir/113311745/REPO-P4MULTI-JOB1"): error=2, No such file or directory
  2. 0

    Ideal Soultions # The option should be removed when using perforce. # The option should look to the perforce checkout dir (as it did pre-multiple repos) However, in the mean time it would be good if the build failed elegently. {code} 2011-12-08 14:45:57,993 INFO [2-BAM::qwerty::Agent:pool-8-thread-1] [TaskResultBuilder] Process exception: com.atlassian.utils.process.ProcessException: java.io.IOException: Cannot run program "/bin/sh" (in directory "/Users/brydie/dev/src/bamboo-hg/bamboo-homes/8085/xml-data/build-dir/113311745/REPO-P4MULTI-JOB1"): error=2, No such file or directory at com.atlassian.utils.process.ExternalProcess.start(ExternalProcess.java:286) at com.atlassian.utils.process.ExternalProcess.execute(ExternalProcess.java:408) at com.atlassian.bamboo.process.ProcessServiceImpl.executeProcess(ProcessServiceImpl.java:176) at com.atlassian.bamboo.plugins.shell.task.AbstractShellBuildTask.execute(AbstractShellBuildTask.java:62) at com.atlassian.bamboo.plugins.script.task.ScriptBuildTask.execute(ScriptBuildTask.java:53) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:180) at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:88) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:84) at sun.reflect.GeneratedMethodAccessor319.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy484.call(Unknown Source) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:198) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:107) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50) at java.lang.Thread.run(Thread.java:680) Caused by: java.io.IOException: Cannot run program "/bin/sh" (in directory "/Users/brydie/dev/src/bamboo-hg/bamboo-homes/8085/xml-data/build-dir/113311745/REPO-P4MULTI-JOB1"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at com.atlassian.utils.process.ExternalProcess.createProcess(ExternalProcess.java:245) at com.atlassian.utils.process.ExternalProcess.start(ExternalProcess.java:283) ... 22 more 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:53) at java.lang.ProcessImpl.start(ProcessImpl.java:91) at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) ... 24 more {code}

    Atlassian JIRA | 5 years ago | Brydie McCoy [Atlassian]
    com.atlassian.utils.process.ProcessException: java.io.IOException: Cannot run program "/bin/sh" (in directory "/Users/brydie/dev/src/bamboo-hg/bamboo-homes/8085/xml-data/build-dir/113311745/REPO-P4MULTI-JOB1"): error=2, No such file or directory
  3. 0

    Java execute process on linux

    Stack Overflow | 5 years ago | NightWalker
    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

    Cannot run program "gradle" in Jenkins

    Stack Overflow | 5 years ago | Andreas Köberle
    java.io.IOException: Cannot run program "gradle" (in directory "/Users/Shared/Jenkins/Home/jobs/test/workspace"): error=2, No such file or directory
  6. 0

    Process Builder gives a "No such file or directory" on Mac while Runtime().exec() works fine

    Stack Overflow | 5 years ago | Luuk D. Jansen
    java.lang.Exception: Error during coding process: Cannot run program "/opt/local/bin/ffmpeg -i /Users/Luuk/Documents/Java/idoms-server/data/media/1/1/test.mov -y -f mpegts -acodec libmp3lame -ar 48000 -b:a 64000 -vn -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate -1 -bufsize -1 -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -g 30 -async 2 /Users/Luuk/Documents/Java/idoms-server/data/media/1/13/encoded.mp3" (in directory "/Users/Luuk/Documents/Java/idoms-server/data"): 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

    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:53)
    3. java.lang.ProcessImpl.start(ProcessImpl.java:91)
    4. java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
    4 frames
  3. com.atlassian.utils
    ExternalProcess.execute
    1. com.atlassian.utils.process.ExternalProcess.createProcess(ExternalProcess.java:245)
    2. com.atlassian.utils.process.ExternalProcess.start(ExternalProcess.java:283)
    3. com.atlassian.utils.process.ExternalProcess.execute(ExternalProcess.java:408)
    3 frames
  4. com.atlassian.bamboo
    ExecuteBuildTask.call
    1. com.atlassian.bamboo.process.ProcessServiceImpl.executeProcess(ProcessServiceImpl.java:176)
    2. com.atlassian.bamboo.plugins.shell.task.AbstractShellBuildTask.execute(AbstractShellBuildTask.java:62)
    3. com.atlassian.bamboo.plugins.script.task.ScriptBuildTask.execute(ScriptBuildTask.java:53)
    4. com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:180)
    5. com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:88)
    6. com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:84)
    6 frames
  5. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor319.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3. java.lang.reflect.Method.invoke(Method.java:597)
    3 frames
  6. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    3 frames
  7. Hibernate
    HibernateInterceptor.invoke
    1. org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117)
    1 frame
  8. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  9. Unknown
    $Proxy484.call
    1. $Proxy484.call(Unknown Source)
    1 frame
  10. com.atlassian.bamboo
    NamedThreadFactory$2.run
    1. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:198)
    2. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103)
    3. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:107)
    4. com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50)
    4 frames
  11. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:680)
    1 frame