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

sftp component: Cannot acquire read lock for files in sub directories if property recursive=true and readLock=changed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.10.1
    • 2.10.2, 2.11.0
    • camel-ftp
    • None
    • Patch Available
    • Unknown

    Description

      I use endpoint to consummer files from sftp:
      <endpoint id="sftp_server" uri="sftp://${server_path}?privateKeyFile=${sftp_key_path}&localWorkDirectory=${tmp}&idempotent=true&idempotentRepository=#fileStore&readLock=changed&recursive=true&filter=#myAntFilter&fastExistsCheck=true" />

      And if file exist in the sub directory of ${server_path}, I get warning:
      16:31:16,288 WARN [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Cannot acquire read lock within 20000 millis. Will skip the file: GenericFile[qwe/rty/test.csv]

      16:31:01,081 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Using fast exists to update file information for GenericFile[qwe/rty/test.csv]
      16:31:01,082 TRACE [org.apache.camel.component.file.remote.SftpOperations] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) listFiles(inbox2/qwe/rty/test.csv)
      16:31:01,148 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) List files inbox2/qwe/rty/test.csv found 1 files
      16:31:01,149 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Previous last modified: 0, new last modified: 0
      16:31:01,150 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Previous length: 0, new length: 0
      16:31:01,151 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Exclusive read lock not granted. Sleeping for 5000 millis.

      16:30:56,005 TRACE [org.apache.camel.component.file.remote.SftpConsumer] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Processing file: GenericFile[qwe/rty/test.csv]
      16:30:56,007 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Waiting for exclusive read lock to file: GenericFile[qwe/rty/test.csv]
      16:30:56,008 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Using fast exists to update file information for GenericFile[qwe/rty/test.csv]
      16:30:56,010 TRACE [org.apache.camel.component.file.remote.SftpOperations] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) listFiles(inbox2/qwe/rty/test.csv)
      16:30:56,078 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) List files inbox2/qwe/rty/test.csv found 1 files
      16:30:56,079 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Previous last modified: -9223372036854775808, new last modified: 0
      16:30:56,079 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Previous length: -9223372036854775808, new length: 0
      16:30:56,080 TRACE [org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy] (Camel (camel-1) thread #0 - sftp://test@testserver/inbox2) Exclusive read lock not granted. Sleeping for 5000 millis.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            basssjm Jury Matveentsev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: