ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Z W" <mpc8...@gmail.com>
Subject Re: rexec and setting env variables on remote host
Date Tue, 29 Jan 2008 05:50:25 GMT
Hi

<rexec userid="${a_user}"
password="${a_word}"
server="${a_host}"
command=". ./.profile;
cd ${a_dir};
pwd;
echo $MD $JAM;
./try ${Test}  ;
echo 2;
exit;
">
</rexec>
<echo message=" end of target"/>




In using with <rexec> with timeout attribute, is there a way I could cause
the shell script to send EOF so that <rexec> would not
fail ?


C:\start.xml:13: The following error occurred while executing this line:

C:\start.xml:57: Response timed-out waiting for EOF
        at org.apache.tools.ant.ProjectHelper.addLocationToBuildException
(Projec
tHelper.java:541)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java
:105)

        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(
DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: C:\start.xml:57: Response timed-out waiting for EOF
        at
org.apache.tools.ant.taskdefs.optional.net.RExecTask$AntRExecClient.w
aitForEOF(RExecTask.java:277)
        at org.apache.tools.ant.taskdefs.optional.net.RExecTask.execute
(RExecTas
k.java:366)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:288)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(
DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1329)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets
(Single
CheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
        ... 18 more
--- Nested Exception ---
C:\start.xml:57: Response timed-out waiting for EOF
        at
org.apache.tools.ant.taskdefs.optional.net.RExecTask$AntRExecClient.w
aitForEOF(RExecTask.java:277)
        at org.apache.tools.ant.taskdefs.optional.net.RExecTask.execute
(RExecTas
k.java:366)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:288)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(
DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1329)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets
(Single
CheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java
:105)

        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(
DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

On Jan 28, 2008 8:15 PM, Z W <mpc8250@gmail.com> wrote:

> Also within "try" shrell script, I have a nohup command
>
> ie inside try.sh. I have
>
> nohup ./start &
>
> where "start" is another shell script
>
>   On Jan 28, 2008 8:03 PM, Z W <mpc8250@gmail.com> wrote:
>
> > Rob
> >
> > Appreciate your response there.
> > Your approach does allow the env variables read but
> > I'm not sure why rexec hangs when it reaches the end of command
> > execution.
> >
> >
> > <
> > rexec userid="${a_user}"
> >
> > password="${a_word}"
> >
> > server="${a_host}"
> >
> > command=". ./.profile;
> >
> > cd ${a_dir};
> >
> > pwd;
> >
> > echo $MD $JAM;
> >
> > nohup ./try ${Test} \u038 ;
> >
> > echo 2;
> >
> > exit;
> > ">
> >
> > </
> > rexec>
> >
> > <
> > echo message=" end of target"/>
> >
> >
> >
> > Output
> >
> >     [rexec] stty: : Invalid argument
> >     [rexec] /root
> >
> >     [rexec] /mdm /opt
> >     [rexec] Starting prstat.
> >     [rexec] pid = 1985
> >     [rexec] 2                <---------- hangs there, it doesn't move on
> > to echo message.
> >
> >
> >
> > Is there a way to get out of <rexec> task or is it a defect of <rexec>
> > task ?
> >
> > Thanks
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message