ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pdmckenzie <perry.mcken...@netfocusconsulting.com>
Subject Re: Ant sshexec random failures
Date Thu, 28 Jun 2007 17:29:20 GMT

Replying for cprice - the patch below definitely seems to have made the
problem much less noticable.  Previous to applying this patch, we had a
shell script that ssh'ed to a remote box continuously overnight and failed
around 7 - 8 times.  Now it doesn't fail at all.
Thanks!




Atsuhiko Yamanaka-2 wrote:
> 
> Hi,
> 
> 2007/6/1, ken77 <kgraham@cmtek.com>:
>> I am having the same exactly problem with the sshexec, the same script
>> sometimes works, sometimes it gives me "Remote command failed with exit
>> status -1"  , I was wondering if you have found the reason for this and a
>> possible solution ?
> 
> May I ask you to try the attached patch?  It is a patch for SVN HEAD.
> 
> diff -Naur
> ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
> ant.new/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
> --- ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
> 2007-06-01 10:29:07.000000000 +0000
> +++
> ant.new/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
> 2007-06-01 15:54:56.000000000 +0000
> @@ -186,7 +186,7 @@
>              thread =
>                  new Thread() {
>                      public void run() {
> -                        while (!channel.isEOF()) {
> +                        while (!channel.isClosed()) {
>                              if (thread == null) {
>                                  return;
>                              }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

-- 
View this message in context: http://www.nabble.com/Ant-sshexec-random-failures-tf3190085.html#a11347029
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message