You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Christian Ciach (JIRA)" <ji...@apache.org> on 2014/07/24 17:19:38 UTC
[jira] [Comment Edited] (VFS-533) [SFTP] Support connect-timeouts
for SFTP-connections
[ https://issues.apache.org/jira/browse/VFS-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14073289#comment-14073289 ]
Christian Ciach edited comment on VFS-533 at 7/24/14 3:19 PM:
--------------------------------------------------------------
Also, in SftpClientFactory.java, I hightly recommend changing the second call of {{session.setTimeout(timeout)}} (after the connection is made) to {{session.setServerAliveInterval(timeout)}} in . The second method sets the timeout, too, but also sends keep alives to the server to keep the connection alive. We need this in our environment for long-running jobs.
was (Author: cciach-emsys):
Also, in SftpClientFactory.java, I hightly recommend changing the second call {{session.setTimeout(timeout)}} (after the connection is made) to {{session.setServerAliveInterval(timeout)}} in . The second method sets the timeout, too, but also sends keep alives to the server to keep the connection alive. We need this in our environment for long-running jobs.
> [SFTP] Support connect-timeouts for SFTP-connections
> ----------------------------------------------------
>
> Key: VFS-533
> URL: https://issues.apache.org/jira/browse/VFS-533
> Project: Commons VFS
> Issue Type: Improvement
> Affects Versions: 2.0, 2.1
> Reporter: Christian Ciach
> Priority: Minor
> Attachments: sftpConnectTimeout.patch
>
>
> In contrast to other types of FTP filesystems, there is currently no way to have different connection- and socket-timeouts. This is because the Jsch-Session only accepts one timeout property which is used for both purposes. Because of this, a SftpFileSystemConfigBuilder also only provides one method called setTimeout(). The SftpClientFactory then applies this value to the Jsch Session before the connection is made.
> Looking at the implementation of a Jsch Session, it becomes clear the the timeout value is used as a connection timeout if it is set before the call to the connect-method. After the connection is established, one can call setTimeout() again to override the socket timeout.
> Currently VFS has no interface to support this behaviour, so I made a patch to support this.
--
This message was sent by Atlassian JIRA
(v6.2#6252)