Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BBC9518B32 for ; Wed, 13 May 2015 09:28:00 +0000 (UTC) Received: (qmail 26253 invoked by uid 500); 13 May 2015 09:28:00 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 26218 invoked by uid 500); 13 May 2015 09:28:00 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 26186 invoked by uid 99); 13 May 2015 09:28:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 May 2015 09:28:00 +0000 Date: Wed, 13 May 2015 09:28:00 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-8757) SO_TIMEOUT not really set on SFTP connections MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-8757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14541650#comment-14541650 ] Claus Ibsen commented on CAMEL-8757: ------------------------------------ Yeah had a deeper look and found that jsch session sets the timeout on SO socket too. So yeah lets apply your patch. For a default value such as 300000, then we can do this from 2.16 onwards. > SO_TIMEOUT not really set on SFTP connections > --------------------------------------------- > > Key: CAMEL-8757 > URL: https://issues.apache.org/jira/browse/CAMEL-8757 > Project: Camel > Issue Type: Bug > Components: camel-ftp > Affects Versions: 2.14.2, 2.15.2, 2.16.0 > Reporter: Stephan Siano > Priority: Minor > Fix For: 2.14.3, 2.16.0, 2.15.3 > > Attachments: 0001-CAMEL-8757-Set-soTimeout-on-SFTP-endpoints.patch > > > The documentation for the soTimeout parameter in the camel-ftp option says: > FTP and FTPS Only: Camel 2.4: Is the SocketOptions.SO_TIMEOUT value in millis. Note SFTP will automatic use the connectTimeout as the soTimeout. > The last statement is unfortunately not entirely true. JSCH's Session.connect(int connectTimeout) method will initially set the SO_TIMEOUT of the underlying socket to connectTimeout, however once the connection phase is finished, it will change this value to the provided timeout value. > We have an incredibly broken SFTP server. On that connections sometimes hang after the connect phase, which causes polling consumer endpoints to hang in a Socket.read() forever (which means that they stop polling). > IMO the fix for that is twofold: > 1. I attach a (trivial one-line) fix for the camel-ftp component, which will set the soTimeout parameter to the timeout parameter of the JSCH session. > 2. Someone with the access rights should modify the camel-ftp documentation > 3. It might make sense to set the default for the soTimeout parameter to something more sane than 0 (forever) but I don't do that in the patch (as it may change the existing behaviour). -- This message was sent by Atlassian JIRA (v6.3.4#6332)