error on slave machine...

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

error on slave machine...

Michael Wiles
build
[Build] $ ant buildjars regendb testAll -Dgen.schema=XXX_CT1 -Ddeploy.mode=default
FATAL: command execution failed
java.io.IOException: CreateProcess: ant buildjars regendb testAll -Dgen.schema=XXX_CT1 -Ddeploy.mode=default error=2
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:79)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:167)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java :251)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:235)
at hudson.remoting.UserRequest.perform(UserRequest.java:57)
at hudson.remoting.UserRequest.perform(UserRequest.java:22)
at hudson.remoting.Request$2.run (Request.java:178)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Recording test results
No test report files were found. Configuration error?

I get the above error when I attempt to run a build on a slave. It is a windows box and I'm using jnlp to launch the slave software on the slave.

If I go to the relevant workspace directory on the slave and paste that command line in, it works fine.

Also, the update of the code from the repo is working great, it is just this step where it is failing...

any ideas?

Michael
Reply | Threaded
Open this post in threaded view
|

Re: error on slave machine...

Prabhat Jha-3
Do you see JAVA_HOME etc set correctly in configuration page for that
slave? In your windows script session, try explicitly setting java_home
and path before running any build related commands. AFAIR, I had to do that.

Regards,
prabhat

Michael Wiles wrote:

> build
> [Build] $ ant buildjars regendb testAll -Dgen.schema=XXX_CT1 -
> Ddeploy.mode=default
> FATAL: command execution failed
> java.io.IOException: CreateProcess: ant buildjars regendb testAll -
> Dgen.schema=XXX_CT1 -Ddeploy.mode=default error=2
> at java.lang.ProcessImpl.create(Native Method)
> at java.lang.ProcessImpl.<init>(Unknown Source)
> at java.lang.ProcessImpl.start(Unknown Source)
> at java.lang.ProcessBuilder.start(Unknown Source)
> at java.lang.Runtime.exec(Unknown Source)
> at hudson.Proc$LocalProc.<init>(Proc.java:79)
> at hudson.Launcher$LocalLauncher.launch(Launcher.java:167)
> at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:251)
> at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:235)
> at hudson.remoting.UserRequest.perform(UserRequest.java:57)
> at hudson.remoting.UserRequest.perform(UserRequest.java:22)
> at hudson.remoting.Request$2.run(Request.java:178)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Recording test results
> No test report files were found. Configuration error?
>
> I get the above error when I attempt to run a build on a slave. It is a
> windows box and I'm using jnlp to launch the slave software on the slave.
>
> If I go to the relevant workspace directory on the slave and paste that
> command line in, it works fine.
>
> Also, the update of the code from the repo is working great, it is
> just this
> step where it is failing...
>
> any ideas?
>
> Michael
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: error on slave machine...

Kohsuke Kawaguchi
Administrator
In reply to this post by Michael Wiles

The win32 error code 2 means "The system cannot find the file
specified", so most likely you didn't have ant in PATH. Go to the system
info page of the slave and check PATH env var.

What's puzzling to me is that when CreateProcess fails like this, Hudson
is supposed to print out "The system cannot find the file specified"
message. But it seems like you didn't get that, right?


Michael Wiles wrote:

> build
> [Build] $ ant buildjars regendb testAll -Dgen.schema=XXX_CT1 -
> Ddeploy.mode=default
> FATAL: command execution failed
> java.io.IOException: CreateProcess: ant buildjars regendb testAll -
> Dgen.schema=XXX_CT1 -Ddeploy.mode=default error=2
> at java.lang.ProcessImpl.create(Native Method)
> at java.lang.ProcessImpl.<init>(Unknown Source)
> at java.lang.ProcessImpl.start(Unknown Source)
> at java.lang.ProcessBuilder.start(Unknown Source)
> at java.lang.Runtime.exec(Unknown Source)
> at hudson.Proc$LocalProc.<init>(Proc.java:79)
> at hudson.Launcher$LocalLauncher.launch(Launcher.java:167)
> at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:251)
> at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:235)
> at hudson.remoting.UserRequest.perform(UserRequest.java:57)
> at hudson.remoting.UserRequest.perform(UserRequest.java:22)
> at hudson.remoting.Request$2.run(Request.java:178)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Recording test results
> No test report files were found. Configuration error?
>
> I get the above error when I attempt to run a build on a slave. It is a
> windows box and I'm using jnlp to launch the slave software on the slave.
>
> If I go to the relevant workspace directory on the slave and paste that
> command line in, it works fine.
>
> Also, the update of the code from the repo is working great, it is just this
> step where it is failing...
>
> any ideas?
>
> Michael
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: error on slave machine...

Michael Wiles
After much digging this is it...

For windows you need to specify "ant.bat" rather than "ant". Must have something to do with the way the OS resolves the extension and makes it executable.

If you do Runtime.getRuntime().exec("ant");

Then you get the above error...

However, if you do Runtime.getRuntime().exec("ant.bat");

Then it runs ant!

On 6/22/07, Kohsuke Kawaguchi <[hidden email]> wrote:

The win32 error code 2 means "The system cannot find the file
specified", so most likely you didn't have ant in PATH. Go to the system
info page of the slave and check PATH env var.

What's puzzling to me is that when CreateProcess fails like this, Hudson
is supposed to print out "The system cannot find the file specified"
message. But it seems like you didn't get that, right?


Michael Wiles wrote:

> build
> [Build] $ ant buildjars regendb testAll - Dgen.schema=XXX_CT1 -
> Ddeploy.mode=default
> FATAL: command execution failed
> java.io.IOException: CreateProcess: ant buildjars regendb testAll -
> Dgen.schema=XXX_CT1 -Ddeploy.mode=default error=2
> at java.lang.ProcessImpl.create(Native Method)
> at java.lang.ProcessImpl.<init>(Unknown Source)
> at java.lang.ProcessImpl.start(Unknown Source)
> at java.lang.ProcessBuilder.start(Unknown Source)
> at java.lang.Runtime.exec(Unknown Source)
> at hudson.Proc$LocalProc.<init>(Proc.java:79)
> at hudson.Launcher$LocalLauncher.launch(Launcher.java:167)
> at hudson.Launcher$RemoteLaunchCallable.call (Launcher.java:251)
> at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:235)
> at hudson.remoting.UserRequest.perform(UserRequest.java:57)
> at hudson.remoting.UserRequest.perform(UserRequest.java :22)
> at hudson.remoting.Request$2.run(Request.java:178)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Recording test results
> No test report files were found. Configuration error?
>
> I get the above error when I attempt to run a build on a slave. It is a
> windows box and I'm using jnlp to launch the slave software on the slave.
>
> If I go to the relevant workspace directory on the slave and paste that
> command line in, it works fine.
>
> Also, the update of the code from the repo is working great, it is just this
> step where it is failing...
>
> any ideas?
>
> Michael
>


--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]




--
see my blog:
http://analysis102.blogspot.com
http://audiblethoughts.blogspot.com
http://outsideofficehours.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: error on slave machine...

Kohsuke Kawaguchi
Administrator
Michael Wiles wrote:

> After much digging this is it...
>
> For windows you need to specify "ant.bat" rather than "ant". Must have
> something to do with the way the OS resolves the extension and makes it
> executable.
>
> If you do Runtime.getRuntime().exec("ant");
>
> Then you get the above error...
>
> However, if you do Runtime.getRuntime().exec("ant.bat");
>
> Then it runs ant!
OK. The ant builder class in Hudson does this already. It checks the OS
and launches ant or ant.bat

I thought when you use the batch file builder, cmd.exe interprets "ant"
as an invocation of "ant.bat" (by searching path and extension.)

Which builder are you using?

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: error on slave machine...

Michael Wiles
I am using the ant build.

I did get the slave to work using the windows command line opion and specifying ant.bat and told it the absolute location of my build file. i.e. ant.bat -f <Project Name>/build.xml

If I use the ant builder however, I get the error=2 - it's weird that this only happens on the _slave_ machine though, builds on the master work fine.

I don't know if this is significant, but on the master machine the console output says the command line is [Project Name] $ cmd.exe /C ant.bat build && exit %%ERRORLEVEL%% - this if for an _ant_ build

But if i tie the build to a slave the command line reported is [Project Name] $ ant build

The slave is a windows machine running the slave launched via jnlp running with java 5re.

On 7/5/07, Kohsuke Kawaguchi <[hidden email]> wrote:
Michael Wiles wrote:

> After much digging this is it...
>
> For windows you need to specify "ant.bat" rather than "ant". Must have
> something to do with the way the OS resolves the extension and makes it
> executable.
>
> If you do Runtime.getRuntime().exec("ant");
>
> Then you get the above error...
>
> However, if you do Runtime.getRuntime().exec("ant.bat");
>
> Then it runs ant!

OK. The ant builder class in Hudson does this already. It checks the OS
and launches ant or ant.bat

I thought when you use the batch file builder, cmd.exe interprets "ant"
as an invocation of "ant.bat" (by searching path and extension.)

Which builder are you using?

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]




--
see my blog:
http://analysis102.blogspot.com
http://audiblethoughts.blogspot.com
http://outsideofficehours.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: error on slave machine...

Kohsuke Kawaguchi
Administrator

For the record, this was filed as issue #631 and fixed in 1.118.

Michael Wiles wrote:

> I am using the ant build.
>
> I did get the slave to work using the windows command line opion and
> specifying ant.bat and told it the absolute location of my build file. i.e.
> ant.bat -f <Project Name>/build.xml
>
> If I use the ant builder however, I get the error=2 - it's weird that this
> only happens on the _slave_ machine though, builds on the master work fine.
>
> I don't know if this is significant, but on the master machine the console
> output says the command line is *[Project Name] $ cmd.exe /C ant.bat build
> && exit %%ERRORLEVEL%% - *this if for an _ant_ build
> *
> *But if i tie the build to a slave the command line reported is *[Project
> Name] $ ant build* *
> *
> The slave is a windows machine running the slave launched via jnlp running
> with java 5re.
>
> On 7/5/07, Kohsuke Kawaguchi <[hidden email]> wrote:
>>
>> Michael Wiles wrote:
>> > After much digging this is it...
>> >
>> > For windows you need to specify "ant.bat" rather than "ant". Must have
>> > something to do with the way the OS resolves the extension and makes it
>> > executable.
>> >
>> > If you do Runtime.getRuntime().exec("ant");
>> >
>> > Then you get the above error...
>> >
>> > However, if you do Runtime.getRuntime().exec("ant.bat");
>> >
>> > Then it runs ant!
>>
>> OK. The ant builder class in Hudson does this already. It checks the OS
>> and launches ant or ant.bat
>>
>> I thought when you use the batch file builder, cmd.exe interprets "ant"
>> as an invocation of "ant.bat" (by searching path and extension.)
>>
>> Which builder are you using?
>>
>> --
>> Kohsuke Kawaguchi
>> Sun Microsystems                   [hidden email]
>>
>>
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment