Dear Team,

I'm facing an issue while downloading files from remote using sftp. But at
the same time when the file is available on SFTP location, I am able to
download files but in the remaining time , it throws an error. Please find
the details below:

*Camel Version : 4.2.0*
*Quarkus Version : 3.6.3*

*SFTP route endpoint configuration :*

sftp://
user@127.0.0.1:22//process/IN?antInclude=ACH-*.txt&ciphers=aes128-cbc&delete=true&existDirCheckUsingLs=false&fastExistsCheck=false&keyExchangeProtocols=diffie-hellman-group1-sha1&password=xxxxxx&preferredAuthentications=password&readLock=changed&serverHostKeys=ssh-rsa&stepwise=false&useUserKnownHostsFile=false&delay=5
.

*Error :*

sftp://user@127.0.0.1:22//process/IN) Trying to recover by force
disconnecting from remote server and re-connecting at next poll: sftp://
user@127.0.0.1:22
2025-04-25 :12:17:49.661 DEBUG traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.RemoteFileConsumer] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) Force disconnecting from: sftp://
user@127.0.0.1:22
2025-04-25 :12:17:49.664 WARN  traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.SftpConsumer] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) Failed polling endpoint: sftp://
user@127.0.0.1:22//process/IN?antInclude=ACH-*.txt&ciphers=aes128-cbc&delay=5&delete=true&existDirCheckUsingLs=false&fastExistsCheck=true&keyExchangeProtocols=diffie-hellman-group1-sha1&password=xxxxxx&preferredAuthentications=password&readLock=changed&serverHostKeys=ssh-rsa&stepwise=false&useUserKnownHostsFile=xxxxxx.
Will try again at next poll. Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot list directory: process/IN]:
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
list directory: process/IN
        at
org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:765)
        at
org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:76)
        at
org.apache.camel.component.file.remote.SftpConsumer.listFiles(SftpConsumer.java:192)
        at
org.apache.camel.component.file.remote.SftpConsumer.getSftpRemoteFiles(SftpConsumer.java:200)
        at
org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:134)
        at
org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:97)
        at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:139)
        at
org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:203)
        at
org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:117)
        at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at
java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
        at
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
        at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: 3: Permission denied
        at
com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2829)
        at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1607)
        at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1535)
        at
org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:759)
        ... 14 more

2025-04-25 :12:17:50.165 DEBUG traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.RemoteFileConsumer] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) Not connected/logged in, connecting to:
sftp://user@127.0.0.1:22
2025-04-25 :12:17:50.165 DEBUG traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.SftpOperations] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) Using ciphers: aes128-cbc
2025-04-25 :12:17:50.166 DEBUG traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.SftpOperations] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) Using KEX: diffie-hellman-group1-sha1
2025-04-25 :12:17:50.166 DEBUG traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.SftpOperations] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) Using StrictHostKeyChecking: no
2025-04-25 :12:17:50.166 DEBUG traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.SftpOperations] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) Using PreferredAuthentications: password
2025-04-25 :12:17:50.166 DEBUG traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.SftpOperations] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) Using ServerHostKeys: ssh-rsa
2025-04-25 :12:17:50.357 WARN  traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.SftpOperations] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) JSCH -> Permanently added '127.0.0.1' (RSA)
to the list of known hosts.
2025-04-25 :12:17:50.651 DEBUG traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.SftpOperations] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) Connected to sftp://user@127.0.0.1:22
2025-04-25 :12:17:50.651 DEBUG traceId=, parentId=, spanId=, sampled=
[or.ap.ca.co.fi.re.RemoteFileConsumer] (Camel (camel-1) thread #2 - sftp://
user@127.0.0.1:22//process/IN) Connected and logged in to: sftp://
user@127.0.0.1:22

-- 


*Regards,*
*Bikash Kaushik*

Reply via email to