2

I am getting following exception all of a sudden from Jenkins.

*Building in workspace /data/jenkins/workspace/BIG_QUERY_TABLE_CREATE_PROCESSOR/table_name/xxxxxx
[xxxxx] $ /bin/sh -xe /tmp/jenkins2448049600259551489.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)
Caused: java.io.IOException: Cannot run program "/bin/sh" (in directory "/data/jenkins/workspace/BIG_QUERY_TABLE_CREATE_PROCESSOR/table_name/xxxxx"): error=7, Argument list too long
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at hudson.Proc$LocalProc.<init>(Proc.java:252)
    at hudson.Proc$LocalProc.<init>(Proc.java:221)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:996)

I have used table name as a user defined axis variable to pass the value of table name.

java -server -Xms256m -Xmx512m -Dquarkus.http.port=0 -classpath ".:/opt/xxx/xxxx-jar/machine-learning-xxxx-cluster-computation-jar-0.0.1-SNAPSHOT-allinone.jar" com.xxxx.dataflow.xxxx.bigquery.admin.processor.main.BigqueryTableCreateProcessorMain -c ALL -p xxxxxx -d ${DATASET} -t ${table_name} -a 1 –

How to resolve it?

Ian W
  • 4,559
  • 2
  • 18
  • 37
Mohan Kumar
  • 101
  • 1
  • 5
  • 1
    This is most likely not a Jenkins issue, rather a shell command issue, which has a [character limit](https://stackoverflow.com/questions/11289551/argument-list-too-long-error-for-rm-cp-mv-commands). Post the shell step content to understand details. – Ian W Mar 06 '22 at 01:08
  • java -server -Xms256m -Xmx512m -Dquarkus.http.port=0 -classpath ".:/opt/xxx/xxxx-jar/machine-learning-xxxx-cluster-computation-jar-0.0.1-SNAPSHOT-allinone.jar" com.xxxx.dataflow.xxxx.bigquery.admin.processor.main.BigqueryTableCreateProcessorMain -c ALL -p xxxxxx -d ${DATASET} -t ${table_name} -a 1 – Mohan Kumar Mar 06 '22 at 11:41
  • Above is the command – Mohan Kumar Mar 06 '22 at 11:41
  • Even If I submit a simple echo command, I get the same exception. – Mohan Kumar Mar 06 '22 at 12:00
  • What is the trailing dash about "`... -a 1 –`" ? Typically on a unix command a dash expects a parameter or represents a command from `stdin`. Does that even work outside Jenkins, from a regular shell command line? – Ian W Mar 07 '22 at 05:05
  • `${DATASET}` might be the problem since it could expand into many arguments. – bjc Jun 10 '22 at 02:27

0 Answers0