[ 
https://issues.apache.org/jira/browse/CAMEL-12061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16280176#comment-16280176
 ] 

dieter von holten commented on CAMEL-12061:
-------------------------------------------

i looked through the sources along the stacktrace - what happens during the 
attempted poll and the exception looks reasonable for me.
However, the restart/retry-things are a little bit unclear. One excepion claims 
'will try to reconnect on next attempt..' but i have yet to find the things 
which enforce a reconnect after a failed poll....


> SFTP exception-handling more problemtatic than documented
> ---------------------------------------------------------
>
>                 Key: CAMEL-12061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12061
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-sftp
>    Affects Versions: 2.20.1
>         Environment: java 8, windows 2008 r2, 
>            Reporter: dieter von holten
>            Priority: Minor
>              Labels: ioexception, sftp
>
> my poll-sftp-server-for-files-to-download route crashes fom time to time. i 
> happend to get a stacktrace which indicates an IoException when the SFTP 
> component changes the folder to inspect on the remote site. Can happen - 
> however, contrary to the documentation, which says an exception produces a 
> warning and is otherwise ignored, the whole application goes down.
> -------------------------------------------------------------------------
> {{
> Dez 04, 2017 3:45:34 PM 
> org.apache.camel.component.file.remote.RemoteFilePolling
> ConsumerPollStrategy rollback
> WARNUNG: Trying to recover by disconnecting from remote server forcing a 
> re-connect at next poll: sftp://XXXXXXXXXXXXXXXX
> Dez 04, 2017 3:45:34 PM org.apache.camel.util.CamelLogger log
> WARNUNG: Consumer 
> Consumer[sftp://XXXXXXXXXXXXX/out/prod/?delay=30000&delete=true&localWorkDirectory=c%3A%2FMarta%2FHgmTkw14%2Femcs%2Ftemp%2F&password=
> xxxxxx] failed polling endpoint: 
> sftp://XXXXXXXXXXXXX/out/prod/?delay=30000&delete=true&localWorkDirectory=c%3A%2FMarta%2FHgmTkw14%2Femcs%2Ftemp%2F&pas
> sword=xxxxxx. Will try again at next poll. Caused by: 
> [org.apache.camel.component.file.GenericFileOperationFailedException - Cannot 
> change directory to: out]
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> change directory to: out
>         at 
> org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:609)
>         at 
> org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:597)
>         at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:108)
>         at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>         at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>         at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>         at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: 4:
>         at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:359)
>         at 
> org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:607)
>         ... 13 more
> Caused by: java.io.IOException: inputstream is closed
>         at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2911)
>         at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2935)
>         at com.jcraft.jsch.ChannelSftp._realpath(ChannelSftp.java:2355)
>         at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:342)
>         ... 14 more
> }}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to