Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-2912

SFTP throws ResolveEndpointFailedException when "ftpClient.connectionTimeout" option is provided

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0
    • camel-ftp
    • None

    Description

      Currently, SFTP throws an ResolveEndpointFailed exception if the option "ftpClient.connectionTimeout" is provided as a part of the URI. This could be fixed by calling the Session.connect(int timeout) method of JSCH. Some investigation reveals that this method eventually calls Socket.setSoTimeout(int timeout), which implies that the time unit of the timeout is milliseconds.

      http://grepcode.com/file/repo1.maven.org/maven2/com.jcraft/jsch/0.1.42/com/jcraft/jsch/Session.java#Session.connect%28int%29

      Example:

      sftp://user@host/dir?password=secret&ftpClient.connectionTimeout=30000&disconnect=true&passiveMode=true

      ResolveEndpointFailedException:
      [...]
      There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[

      {ftpClient.connectionTimeout=30000}

      ]

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            matsev Mattias Severson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: