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
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  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
    samebug tip
    Try updating IDE to 1.6.12 or further.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java execute process on linux

    Stack Overflow | 5 years ago | NightWalker
    java.io.IOException: error=2, No such file or directory
  6. 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
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