Dear camel-community
I have the following route (simplified):
RemoteFileEndpoint ftpEndpoint =
endpoint("sftp:ftp.myhost.com/?username=user&password=xxxxx&delay=43200000&disconnect=true",
RemoteFileEndpoint.class);
ftpEndpoint.setFilter(new MyDownloadFileFilter());
from(ftpEndpoint)
.to("file:{{configured.dl.dir}}")
.log("Downloaded ${header.CamelFileName} over FTP")
.to("direct:further-processing")
.end();
This route worked as expected and I could download all files that are
accepted by MyDownloadFileFilter.
After upgrading from 2.15.x to the latest camel version 2.16.0, I faced the
following exception:
WARN ] 2015-11-25 09:41:12.988 [Camel (camel-1) thread #2 -
sftp://ftp.myhost.com/] RemoteFilePollingConsumerPollStrategy - Trying to
recover by disconnecting from remote server forcing a re-connect at next
poll: sftp://[email protected]:22
[WARN ] 2015-11-25 09:41:12.993 [Camel (camel-1) thread #2 -
sftp://ftp.myhost.com/] SftpConsumer - Consumer
Consumer[sftp://ftp.myhost.com/?delay=43200000&disconnect=true&password=xxxxxx&username=user]
failed polling endpoint:
Endpoint[sftp://ftp.myhost.com/?delay=43200000&disconnect=true&password=xxxxxx&username=user].
Will try again at next poll. Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot list directory: .]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
list directory: .
at
org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:597)
~[camel-ftp-2.16.0.jar:2.16.0]
at
org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:574)
~[camel-ftp-2.16.0.jar:2.16.0]
at
org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:115)
~[camel-ftp-2.16.0.jar:2.16.0]
at
org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:79)
~[camel-ftp-2.16.0.jar:2.16.0]
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:119)
~[camel-core-2.16.0.jar:2.16.0]
at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
[camel-core-2.16.0.jar:2.16.0]
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
[camel-core-2.16.0.jar:2.16.0]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[?:1.8.0_60]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
[?:1.8.0_60]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[?:1.8.0_60]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[?:1.8.0_60]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:1.8.0_60]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:1.8.0_60]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]
Caused by: com.jcraft.jsch.SftpException:
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1720)
~[jsch-0.1.53.jar:?]
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1526)
~[jsch-0.1.53.jar:?]
at
org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:588)
~[camel-ftp-2.16.0.jar:2.16.0]
... 13 more
Caused by: java.io.IOException: Pipe closed
at java.io.PipedInputStream.read(PipedInputStream.java:307)
~[?:1.8.0_60]
at
com.jcraft.jsch.Channel$MyPipedInputStream.updateReadSide(Channel.java:362)
~[jsch-0.1.53.jar:?]
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1543)
~[jsch-0.1.53.jar:?]
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1526)
~[jsch-0.1.53.jar:?]
at
org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:588)
~[camel-ftp-2.16.0.jar:2.16.0]
... 13 more
What could be the issue here? I tried to play with the 'disconnect' and the
'stepwise' flag, but it does not resolve the issue. Thanks for your help.
--
View this message in context:
http://camel.465427.n5.nabble.com/sFTP-listFiles-does-not-work-after-upgrade-from-2-15-x-to-2-16-0-tp5774379.html
Sent from the Camel - Users mailing list archive at Nabble.com.