Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.io.IOException: Cannot run program "ant"

 
alberto garcia perez
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm running a Job in Hudson.
I build this job from a Hudson Master Server but the job is built in a Hudson Linux Node.
This is the result:

Started by user builder
Building remotely on Linux-Node
Updating http://150.200.20.200:8000/mvtv_all/DESCOS/MVTVc_D2ph1/branches revision: 17-may-2013 16:01:46 depth:infinity ignoreExternals: false
At revision 529
Updating http://150.200.200.200:8000/mvtv_all/DESCOS/KaluModules/branches revision: 17-may-2013 16:01:46 depth:infinity ignoreExternals: false
At revision 529
no change for http://159.200.300.20:8000/mvtv_all/DESCOS/MVTVc_D2ph1/branches since the previous build
no change for http://159.230.300.20:8000/mvtv_all/DESCOS/KaluModules/branches since the previous build
No emails were triggered.
[bt] $ ant -file build.xml -DSUBSYSTEM=ALL -DTARGET=makeBuild -DCRLIST= -DOWNER= -DbuildTool.patch.release=$RELEASE -DbuildTool.system=$SYSTEM -DbuildTool.patch.type=$PATCH_TYPE -DbuildTool.subsystem=ALL -DbuildTool.buildRules=pkgBuild -DbuildTool.dynamicView=$WORKSPACE/ALL -DbuildTool.compilationRules=compile -DbuildTool.patch.name=$PATCH_NAME makeBuild
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 "/hudson/buildTool/src/bt"): error=2, No existe el fichero o el directorio
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at hudson.Proc$LocalProc.<init>(Proc.java:192)
at hudson.Proc$LocalProc.<init>(Proc.java:164)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:639)
at hudson.Launcher$ProcStarter.start(Launcher.java:274)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:794)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:768)
at hudson.remoting.UserRequest.perform(UserRequest.java:114)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:283)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
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:722)
Caused by: java.io.IOException: error=2, No existe el fichero o el directorio
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
... 15 more


Do you know something about this issue?

Thanks and Regards
 
Saif Asif
Ranch Hand
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings Alberto and welcome to the ranch.

java.io.IOException: Cannot run program "ant" (in directory "/hudson/buildTool/src/bt"): error=2, No existe el fichero o el directorio


That is a no file or directory found exception. See if the directory hudson/buildTool/src/bt actualy exists and that you have read/write permissions on it.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is Ant located on the Linux build slave? In Hudson, when you configured Ant for the build slave, did you use the correct location? In the job in question, did you specify the correct Ant version (that matches the build slave location)?
 
alberto garcia perez
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saif Asif wrote:Greetings Alberto and welcome to the ranch.

java.io.IOException: Cannot run program "ant" (in directory "/hudson/buildTool/src/bt"): error=2, No existe el fichero o el directorio


That is a no file or directory found exception. See if the directory hudson/buildTool/src/bt actualy exists and that you have read/write permissions on it.


Hi Saif!!

/hudson/buildTool/src/bt exists with the following permissions: drwxr-xr-x 8 builder builder 4096 may 17 00:11 bt
build.xml is inside with this permissions: -rwxr-xr-x 1 builder builder 6454 nov 27 16:40 build.xml

Thanks for your support.

Regards
 
alberto garcia perez
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter Johnson wrote:Where is Ant located on the Linux build slave? In Hudson, when you configured Ant for the build slave, did you use the correct location? In the job in question, did you specify the correct Ant version (that matches the build slave location)?


Hi Peter!

Ant Location on Linux Slave: /usr/apache-ant/apache-ant-1.8.2/

This is the tool location in Hudson: (Ant 1.82) /usr/apache/apache-ant-1.8.2/bin

In the job in question I don't specify any Ant version. I select Default version. If I select Ant 1.82 version the Output Console is this:
FATAL: Cannot find executable from the choosen Ant installation "ant1.82"

Thanks!

 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
alberto garcia perez wrote:Ant Location on Linux Slave: /usr/apache-ant/apache-ant-1.8.2/

This is the tool location in Hudson: (Ant 1.82) /usr/apache/apache-ant-1.8.2/bin

Is there a typo here? If not, then Hudson has the wrong location.
 
alberto garcia perez
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter Johnson wrote:
alberto garcia perez wrote:Ant Location on Linux Slave: /usr/apache-ant/apache-ant-1.8.2/

This is the tool location in Hudson: (Ant 1.82) /usr/apache/apache-ant-1.8.2/bin

Is there a typo here? If not, then Hudson has the wrong location.


Yes, sorry.
ANT_HOME is /usr/apache/apache-ant-1.8.2/

I have solved this problem changing the Linux-Node configuration on Hudson:
Home=/usr/bin/

It works! (But I don't know the reason)

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic