You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2008/02/21 21:28:08 UTC
Re: Time out when using FTPClient.storeFile
In message <82...@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
Re: Time out when using FTPClient.storeFile
Posted by shaw shaw <sh...@yahoo.com>.
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" <df...@savarese.org> wrote:
In message <82...@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.