Please ignore my question. The sshexec tasks works now even though I didn't change 
anything that should have made a difference.

Rhino

  ----- Original Message ----- 
  From: Rhino 
  To: ant-user 
  Sent: Monday, October 18, 2004 7:53 PM
  Subject: Question re sshexec and MySQL


  Hi,

  I'm trying to run a slightly complicated command in an sshexec task and I'm getting 
an error that I don't understand. Here is the task:

  <sshexec host="${server.hostname}" username="${tonge-userid}" 
password="${tonge-password}" trust="true" 

  command="cd ${server.target.dir}; mysql -u ${mysql-userid} -p${mysql-password} &lt; 
Load_Dougs_Movies.sql &gt; Load_Dougs_Movies.out"/>



  Here is the output I get from this task with both -debug and -verbose flags on:

  Adding reference: eclipse.progress.monitor

  [sshexec] Connecting to www.tonge.ca:22

  [sshexec] BUILD FAILED: D:\eclipse\workspace\SFL-Servlet\xml\build.xml:89: Remote 
command failed with exit status 1



  The output file, Load_Dougs_Movies.out, exists but is empty.

  I am pretty sure the properties are all substituting properly and that the &gt; and 
&lt; are not a problem; I've executed other MySQL scripts this same way and they 
worked fine. For example, I have a MySQL script named Show_Databases.sql which 
contains:

  show databases;

  When I execute it via:

  <sshexec host="${server.hostname}" username="${tonge-userid}" 
password="${tonge-password}" trust="true" 

  command="cd ${server.target.dir}; mysql -u ${mysql-userid} -p${mysql-password} &lt; 
Show_Databases.sql &gt; Show_Databases.out"/>

  It works fine and Show_Databases.out contains a list of the database names. So I'm 
pretty sure that there is nothing conceptually wrong with what I'm doing.

  Also, when I execute the command that is failing in the sshexec on the Linux command 
line directly (with the properties replaced with the real values of course), the 
command works perfectly.

  Can anyone suggest some way to debug this problem?


  Rhino
  ---
  rhino1 AT sympatico DOT ca
  "There are two ways of constructing a software design. One way is to make it so 
simple that there are obviously no deficiencies. And the other way is to make it so 
complicated that there are no obvious deficiencies." - C.A.R. Hoare

Reply via email to