commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jared Graber" <jgra...@zedak.com>
Subject RE: [VFS] Data timeout
Date Thu, 15 Jun 2006 21:13:01 GMT
Please ignore the first part of the email.  The problem was that a timeout
hadn't been set.  

I'm still curious to know if there is a more generic way to set the timeout
so that as a user of the library I don't have to check the type of Builder I
have.

-Jared

-----Original Message-----
From: Jared Graber [mailto:jgraber@zedak.com] 
Sent: Thursday, June 15, 2006 1:44 PM
To: 'Jakarta Commons Users List'
Subject: [VFS] Data timeout

Hi,

 

I have a daemon that polls an FTP/SFTP server using VFS.  Unfortunately I
ran into a problem where the daemon hangs.  

I am having a great deal of trouble duplicating this issue as it seems to
happen after the daemon is running for many hours.

 

Looking through the logs produced via the daemon provided no insight but I
found something in the FTP Server logs (always the last thing in the FTP log
when this happens):

 

200 Port command successful

LIST

150 Opening data channel for directory list.

425 Can't open data connection.  **** I SUSPECT THIS IS THE CAUSE OF THE
PROBLEM **** 

421 No-transfer-time exceeded. Closing control connection.  **** This is
handled just fine in other places ****

disconnected.

 

 

Has anyone encountered this type of problem and if so what was the solution?

 

I suspect that setting the data timeout would work and I'm in the process of
adding that now.

 

The only way I've found thus far is:

 

String scheme = UriParser.extractScheme(uri);

FileSystemOptions fileSystemOptions = new FileSystemOptions();

FileSystemManager fileSystemManager = VFS.getManager();

FileSystemConfigBuilder builder =
fileSystemManager.getFileSystemConfigBuilder(scheme);

 

Then casting the builder to appropriate builder so that I can call
setTimeout or setDateTimeout

 

 

Is there an easier way to do this that would be more generic, perhaps a
configuration file or something?

 

-Jared

 

 



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


Mime
View raw message