commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaw shaw <shaw...@yahoo.com>
Subject Re: Time out when using FTPClient.storeFile
Date Fri, 22 Feb 2008 17:40:10 GMT
Daniel,
   
  Thank you for your help.  I tried to use setDataTimeout and still got time out.  I changed
the timeout value for both FTPClient.setDataTimeout(timeout) and 
  MySocketFactory.setConnectTimeout(timeout ).  But the actual time out is always same and
is not affected by the value I set.
   
  Thanks,
  Shawn
   
  Below is my code:
  MySocketFactory MySocketFactory = new MySocketFactory();
  MySocketFactory.setConnectTimeout(60000000);
  ftpClient.setSocketFactory(MySocketFactory);
  
  ftpClient.connect(aServer);
  
  ftpClient.login(aID,aPWD);
  ftpClient.enterLocalPassiveMode();
  ftpClient.setDataTimeout(60000000);
  

"Daniel F. Savarese" <dfs@savarese.org> wrote:
  
In message <826971.86216.qm@web50301.mail.re2.yahoo.com>, shaw shaw writes:
> at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:5

It looks like the timeout is occuring with the data connection. Try
using setDataTimeout:
http://commons.apache.org/net/apidocs/org/apache/commons/net/ftp/FTPClient.html#setDataTimeout(int)

daniel



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org



       
---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message