Jenkins bulid get an error message: java.io.IOException: error=7, Argument list too long

What’s  occured?

When Jenkins triggered a  build job defines as “Free-Style Project”, a build failed with this error message


[starfish-verify-drd] $ /bin/bash /tmp/jenkins8550337881106633559.sh

FATAL: command execution failed

java.io.IOException: error=7, Argument list too long

	at java.lang.UNIXProcess.forkAndExec(Native Method)

	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)

	at java.lang.ProcessImpl.start(ProcessImpl.java:134)

	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)

Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to swfarm-gateuobld17

		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1737)

		at hudson.remoting.UserResponse.retrieve(UserRequest.java:313)

		at hudson.remoting.Channel.call(Channel.java:952)

		at hudson.Launcher$RemoteLauncher.launch(Launcher.java:1052)

		at hudson.Launcher$ProcStarter.start(Launcher.java:449)

		at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)

		at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)

		at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)

		at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)

		at hudson.model.Build$BuildExecution.build(Build.java:206)

		at hudson.model.Build$BuildExecution.doRun(Build.java:163)

		at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)

		at hudson.model.Run.execute(Run.java:1727)

		at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)

		at hudson.model.ResourceController.execute(ResourceController.java:97)

		at hudson.model.Executor.run(Executor.java:429)

Caused: java.io.IOException: Cannot run program "/bin/bash" (in directory "/vol/users/gatekeeper.tvsw/cerberus_root/starfish-verify-drd"): error=7, Argument list too long

	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)

Cause 

  • One argument must not be longer than MAX_ARG_STRLEN (131072 bytes)

Reference

Advertisements