java.io.IOException: Cannot run program "/bin/bash" (in directory "/home/devops/jenkins_slave/workspace/ReviewBoard/Test_Coverage_Report"): error=7, Argument list too long

Jenkins JIRA | Rick Liu | 6 months ago
  1. 0

    Under "Promotion process / Actions", I add an action "Execute shell" with commands below: {code} #!/bin/bash echo "test!!!" {code} And promotion job is always failed with: {code} [Test_Coverage_Report] $ /bin/bash -xe /tmp/hudson4980267768844983951.sh FATAL: command execution failed java.io.IOException: Cannot run program "/bin/bash" (in directory "/home/devops/jenkins_slave/workspace/ReviewBoard/Test_Coverage_Report"): error=7, Argument list too long at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) at ......remote call to jenkins-slave98(172.18.25.208)(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at hudson.Launcher$RemoteLauncher.launch(Launcher.java:928) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64) at hudson.plugins.promoted_builds.Promotion$RunnerImpl.build(Promotion.java:405) at hudson.plugins.promoted_builds.Promotion$RunnerImpl.doRun(Promotion.java:347) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.Run.run(Run.java:1676) at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:286) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.io.IOException: error=7, Argument list too long at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:187) at java.lang.ProcessImpl.start(ProcessImpl.java:130) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) failed build hudson.tasks.Shell@6d29c4a8 SUCCESS {code}

    Jenkins JIRA | 6 months ago | Rick Liu
    java.io.IOException: Cannot run program "/bin/bash" (in directory "/home/devops/jenkins_slave/workspace/ReviewBoard/Test_Coverage_Report"): error=7, Argument list too long
  2. 0

    When use "*Extended Choice Parameter plug-in*" together with "*JSON parameter type*", I'll hit the error below for "*Exeucte Shell*" in "*Promotion process / Action*". When use "*Extended Choice Parameter plug-in*" together with "*Basic Parameter Types*", then everything is ok. Below is the JSON groovy script I'm using: {code} import org.boon.Boon; def jsonEditorOptions = Boon.fromJson(/{ disable_edit_json: true, disable_properties: true, no_additional_properties: false, disable_collapse: true, disable_array_add: false, disable_array_delete: false, disable_array_reorder: true, theme: "bootstrap2", iconlib:"bootstrap3", schema: { "type": "object", "title": "Coverage Report Generator", "properties": { "Report Description": { "type": "string", "propertyOrder": 1, "default": "Description", }, "Build File": { "type": "string", "propertyOrder": 2, "media" : { "binaryEncoding": "base64" }, "options" : { "include_filename": true }, }, "Coverage File": { "type": "string", "propertyOrder": 3, "media" : { "binaryEncoding": "base64" }, "options" : { "include_filename": true }, }, "Diff File": { "type": "string", "propertyOrder": 4, "media" : { "binaryEncoding": "base64" }, "options" : { "include_filename": true }, }, "Extra Coverage Files": { "type": "array", "propertyOrder": 5, "title": "Extra Coverage Files", "format": "table", "uniqueItems": true, "items": { "type": "object", "title": "Coverage Files", "properties": { "File": { "type": "string", "propertyOrder": 1, "media" : { "binaryEncoding": "base64" }, "options" : { "include_filename": true }, } } } }, } startval: [ ] }/); return jsonEditorOptions; {code} Under "Promotion process / Actions", I add an action "Execute shell" with commands below: {code} #!/bin/bash echo "test!!!" {code} And promotion job is always failed with: {code} [Test_Coverage_Report] $ /bin/bash -xe /tmp/hudson4980267768844983951.sh FATAL: command execution failed java.io.IOException: Cannot run program "/bin/bash" (in directory "/home/devops/jenkins_slave/workspace/ReviewBoard/Test_Coverage_Report"): error=7, Argument list too long at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) at ......remote call to jenkins-slave98(172.18.25.208)(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at hudson.Launcher$RemoteLauncher.launch(Launcher.java:928) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64) at hudson.plugins.promoted_builds.Promotion$RunnerImpl.build(Promotion.java:405) at hudson.plugins.promoted_builds.Promotion$RunnerImpl.doRun(Promotion.java:347) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.Run.run(Run.java:1676) at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:286) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.io.IOException: error=7, Argument list too long at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:187) at java.lang.ProcessImpl.start(ProcessImpl.java:130) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) failed build hudson.tasks.Shell@6d29c4a8 SUCCESS {code}

    Jenkins JIRA | 6 months ago | Rick Liu
    java.io.IOException: Cannot run program "/bin/bash" (in directory "/home/devops/jenkins_slave/workspace/ReviewBoard/Test_Coverage_Report"): error=7, Argument list too long
  3. 0

    Related to: JENKINS-34440 After using File-Upload feature from JSON-Editor with a single 2MB file upload, the Jenkins job return fatal error: [test-JSON_UI] $ /bin/bash -x /tmp/hudson8925785768174517081.sh FATAL: command execution failed java.io.IOException: Cannot run program "/bin/bash" (in directory "/home/devops/jenkins_slave/workspace/Test/test-JSON_UI"): error=7, Argument list too long at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) at ......remote call to jenkins-slave3(192.168.100.162)(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at hudson.Launcher$RemoteLauncher.launch(Launcher.java:928) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.io.IOException: error=7, Argument list too long at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:187) at java.lang.ProcessImpl.start(ProcessImpl.java:130) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

    Jenkins JIRA | 7 months ago | Rick Liu
    java.io.IOException: Cannot run program "/bin/bash" (in directory "/home/devops/jenkins_slave/workspace/Test/test-JSON_UI"): error=7, Argument list too long
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Related to: JENKINS-34440 After using File-Upload feature from JSON-Editor with a single 2MB file upload, the Jenkins job return fatal error: [test-JSON_UI] $ /bin/bash -x /tmp/hudson8925785768174517081.sh FATAL: command execution failed java.io.IOException: Cannot run program "/bin/bash" (in directory "/home/devops/jenkins_slave/workspace/Test/test-JSON_UI"): error=7, Argument list too long at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) at ......remote call to jenkins-slave3(192.168.100.162)(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at hudson.Launcher$RemoteLauncher.launch(Launcher.java:928) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.io.IOException: error=7, Argument list too long at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:187) at java.lang.ProcessImpl.start(ProcessImpl.java:130) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

    Jenkins JIRA | 7 months ago | Rick Liu
    java.io.IOException: Cannot run program "/bin/bash" (in directory "/home/devops/jenkins_slave/workspace/Test/test-JSON_UI"): error=7, Argument list too long
  6. 0

    'docker build' fails on Linux Jenkins slave with jenkins 1.590

    GitHub | 2 years ago | gcarre
    java.io.IOException: Cannot run program "docker" (in directory "\home\jenkins\jenkins\workspace\gcarre\docker"): 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

    Cannot run program "/bin/bash" (in directory "/home/devops/jenkins_slave/workspace/ReviewBoard/Test_Coverage_Report"): error=7, Argument list too long

    at java.lang.ProcessBuilder.start()
  2. Java RT
    ProcessBuilder.start
    1. java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
    1 frame
  3. Hudson
    Launcher$RemoteLaunchCallable.call
    1. hudson.Proc$LocalProc.<init>(Proc.java:244)
    2. hudson.Proc$LocalProc.<init>(Proc.java:216)
    3. hudson.Launcher$LocalLauncher.launch(Launcher.java:815)
    4. hudson.Launcher$ProcStarter.start(Launcher.java:381)
    5. hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148)
    6. hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113)
    6 frames
  4. Hudson :: Remoting Layer
    InterceptingExecutorService$1.call
    1. hudson.remoting.UserRequest.perform(UserRequest.java:120)
    2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
    3. hudson.remoting.Request$2.run(Request.java:326)
    4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
    4 frames
  5. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames