-
Bug
-
Resolution: Unresolved
-
Major
-
Jenkins version: 1.539
Slave: AIX 5.3, JRE 1.6.0 IBM
I'm trying to execute an Ant build script on a AIX slave where I don't have administrator rights. JAVA_HOME and ANT_HOME are not set by default, so I had to set them (and add them to PATH) in the node configuration.
I deliberately did not configure an Ant installation, neither on the master nor on the slave.
This is the stacktrace that I'm seeing:
[aixtest] $ ant -version FATAL: command execution failed.Maybe you need to configure the job to choose one of your Ant installations? java.io.IOException: Cannot run program "ant" (in directory "/home/xxx/jenkins/workspace/aixtest"): error=2, A file or directory in the path name does not exist. at java.lang.ProcessBuilder.start(ProcessBuilder.java:471) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:707) at hudson.Launcher$ProcStarter.start(Launcher.java:338) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:932) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:899) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) at java.util.concurrent.FutureTask.run(FutureTask.java:149) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) at java.lang.Thread.run(Thread.java:738) Caused by: java.io.IOException: error=2, A file or directory in the path name does not exist. at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:53) at java.lang.ProcessImpl.start(ProcessImpl.java:112) at java.lang.ProcessBuilder.start(ProcessBuilder.java:464) ... 15 more
Oddly enough, if I add an "Execute shell command" build step right before the Ant build step with the command "ant -version" it works:
[aixtest] $ /bin/sh -xe /tmp/hudson5535938035142068913.sh + ant -version Apache Ant(TM) version 1.9.2 compiled on July 8 2013
I debugged both the shell command and the ant execution but could not find any obvious difference. Both are calling something like:
launcher.launch().cmds(args).envs(env).stdout(aca).pwd(buildFilePath.getParent()).join();
In both cases the environment variables seem to be set correctly.
- is related to
-
JENKINS-8830 Hudson AIX slave build is getting stuck on Ant build execution.
- Resolved