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

Deepak Pant commented on CAMEL-5970:
------------------------------------

Can you please tell me if this could happen in Apache Camel 2.8.4 or 2.8.5 
bundled with Apache Service Mix 4.4.1 and 4.4.2 respectively. My routes work 
most of the times and then once every few days I would see following 
information logged in the log files.

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
change directory to: /home/msftpusr
        at 
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:423)[156:org.apache.camel.camel-ftp:2.8.4]
        at 
org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:388)[156:org.apache.camel.camel-ftp:2.8.4]
        at 
org.apache.camel.component.file.remote.SftpOperations.buildDirectory(SftpOperations.java:335)[156:org.apache.camel.camel-ftp:2.8.4]
        at 
org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:243)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:156)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:51)[156:org.apache.camel.camel-ftp:2.8.4]
        at 
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:114)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:284)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:109)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:90)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:306)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:80)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:90)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:306)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.Pipeline.process(Pipeline.java:116)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.Pipeline.process(Pipeline.java:79)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:139)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:106)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:353)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:176)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:137)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:138)[91:org.apache.camel.camel-core:2.8.4]
        at 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:90)[91:org.apache.camel.camel-core:2.8.4]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_31]
        at 
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_31]
        at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_31]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_31]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_31]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_31]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_31]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_31]
        at java.lang.Thread.run(Thread.java:662)[:1.6.0_31]
Caused by: 4: 
        at 
com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:285)[158:org.apache.servicemix.bundles.jsch:0.1.44.2]
        at 
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:421)[156:org.apache.camel.camel-ftp:2.8.4]
        ... 60 more
Caused by: java.io.IOException: Pipe closed
        at java.io.PipedInputStream.read(PipedInputStream.java:291)[:1.6.0_31]
        at java.io.PipedInputStream.read(PipedInputStream.java:361)[:1.6.0_31]
        at 
com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2333)[158:org.apache.servicemix.bundles.jsch:0.1.44.2]
        at 
com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2359)[158:org.apache.servicemix.bundles.jsch:0.1.44.2]
        at 
com.jcraft.jsch.ChannelSftp._realpath(ChannelSftp.java:1819)[158:org.apache.servicemix.bundles.jsch:0.1.44.2]
        at 
com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:268)[158:org.apache.servicemix.bundles.jsch:0.1.44.2]
        ... 61 more

                
> Upon connection cd fails
> ------------------------
>
>                 Key: CAMEL-5970
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5970
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.9.5, 2.10.3
>            Reporter: Yalim Aytul
>            Assignee: Claus Ibsen
>             Fix For: 2.9.6, 2.10.4
>
>         Attachments: camel_test.log
>
>
> cd fails on successful connection with 2.10.3 or 2.9.5
> sftp endpoint 
> [sftp://[email protected]/incoming?disconnect=true&privateKeyFile=sftp-user.ppk&privateKeyFilePassphrase=******]
>  
> Below log excerpt is with 2.8.0, cd works and sftp cd command successfully 
> goes into '/home/sftp-user' directory
> {quote} 
> 20130114 18:42:52,956 INFO  [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] RemoteFileConsumer[133]: Connected and logged in 
> to: sftp://user@host:22
> 20130114 18:42:52,956 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpOperations[339]: getCurrentDirectory()
> 20130114 18:42:52,959 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpConsumer[68]: doPollDirectory from 
> absolutePath: outgoing, dirName: null
> 20130114 18:42:52,959 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpOperations[348]: 
> changeCurrentDirectory(outgoing)
> 20130114 18:42:52,959 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpOperations[389]: Changing directory: outgoing
> 20130114 18:42:52,966 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpConsumer[81]: Polling directory: outgoing
> 20130114 18:42:52,966 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpOperations[415]: listFiles(.)
> 20130114 18:42:52,982 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpConsumer[94]: Found 2 in directory: outgoing
> 20130114 18:42:52,982 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpOperations[348]: 
> changeCurrentDirectory(/home/sftp-user)
> 20130114 18:42:52,982 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpOperations[389]: Changing directory: /
> 20130114 18:42:52,988 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpOperations[389]: Changing directory: home
> 20130114 18:42:52,994 TRACE [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] SftpOperations[389]: Changing directory: sftp-user
> 20130114 18:42:53,000 DEBUG [Camel (camel-1) thread #0 - 
> sftp://user@host/outgoing] GenericFileConsumer[84]: Took 0.044 seconds to 
> poll: outgoing
> {quote}
> Same route fails with 2.95. or 2.10.3 cd command fails.
> {quote}
> 20130114 19:15:53,530 INFO  [Camel (camel-1) thread #0 - 
> file://../test_outbound/] RemoteFileProducer[193]: Connected and logged in 
> to: 
> Endpoint[sftp://user@host/incoming?disconnect=true&knownHostsFile=env%2FunitTest%2Fknown_hosts&privateKeyFile=env%2FunitTest%2Fkeys%2Fsftp-user.ppk&privateKeyFilePassphrase=******&separator=Auto]
> 20130114 19:15:53,530 TRACE [Camel (camel-1) thread #0 - 
> file://../test_outbound/] SftpOperations[305]: buildDirectory(incoming,false)
> 20130114 19:15:53,530 TRACE [Camel (camel-1) thread #0 - 
> file://../test_outbound/] SftpOperations[372]: getCurrentDirectory()
> 20130114 19:15:53,670 TRACE [Camel (camel-1) thread #0 - 
> file://../test_outbound/] SftpOperations[381]: 
> changeCurrentDirectory(/home/sftp-user)
> 20130114 19:15:53,670 TRACE [Camel (camel-1) thread #0 - 
> file://../test_outbound/] SftpOperations[372]: getCurrentDirectory()
> 20130114 19:15:53,670 TRACE [Camel (camel-1) thread #0 - 
> file://../test_outbound/] SftpOperations[430]: Changing directory: \
> 20130114 19:15:53,749 TRACE [Camel (camel-1) thread #0 - 
> file://../test_outbound/] SftpOperations[430]: Changing directory: home
> 20130114 19:15:53,796 WARN  [Camel (camel-1) thread #0 - 
> file://../test_outbound/] RemoteFileProducer[71]: Writing file failed with: 
> Cannot change directory to: home
> {quote}
> Looks like separator is bad but I tried all 3 options (Windows,Unix,Auto)... 
> none worked. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to