I am trying to download files from a remote server. But its not downloading
without any exception. Below is my code in camel-context.xml:

*<route id="REPDownload">
            <from
uri="sftp://u006...@mxea004.getme.com/work/data/local?password=me@567&amp;binary=true&amp;stepwise=false";
/>
            <to uri="file:C:\Users\SAND\Desktop\input\CSV\Color?noop=true"
/>
        </route>*

After I enabled debug I got the below logs. Couldn't get the exact problem.

*[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with ObjectName:
org.apache.camel:context=myContext,type=endpoints,name="file://C:%5CUsers%5CSAND%5CDesktop\?noop=true"
[pache.camel.spring.Main.main()] DefaultChannel                 DEBUG
Initialize channel for target: 'To[file:C:\Users\SAND\Desktop?noop=true]'
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with ObjectName:
org.apache.camel:context=myContext,type=tracer,name=BacklogTracer
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with ObjectName:
org.apache.camel:context=myContext,type=tracer,name=BacklogDebugger
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with ObjectName:
org.apache.camel:context=myContext,type=errorhandlers,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)"
[pache.camel.spring.Main.main()] SpringCamelContext             INFO 
AllowUseOriginalMessage is enabled. If access to the original message is not
needed, then its recommended to turn this option off as it may improve
performance.
[pache.camel.spring.Main.main()] SpringCamelContext             INFO 
StreamCaching is not in use. If using streams then its recommended to enable
stream caching. See more details at
http://camel.apache.org/stream-caching.html
[pache.camel.spring.Main.main()] SpringCamelContext             DEBUG
Warming up route id: REPDownload having autoStartup=true
[pache.camel.spring.Main.main()] RouteService                   DEBUG
Starting services on route: REPDownload
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: backoffMultiplier on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: 0
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: sendEmptyMessageWhenIdle on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: false
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: schedulerProperties on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: null
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: initialDelay on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: 1000
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: backoffIdleThreshold on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: 0
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: scheduler on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: null
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: delay on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: 500
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: useFixedDelay on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: true
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: pollStrategy on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value:
org.apache.camel.component.file.remote.RemoteFilePollingConsumerPollStrategy@1dd0325
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: startScheduler on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: true
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: runLoggingLevel on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: TRACE
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: backoffErrorThreshold on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: 0
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: greedy on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: false
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: scheduledExecutorService on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: null
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: timeUnit on bean:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with value: MILLISECONDS
[pache.camel.spring.Main.main()] RouteService                   DEBUG
Starting child service on route: REPDownload ->
Channel[sendTo(Endpoint[file://C:%5CUsers%5CSAND%5CDesktop?noop=true])]
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with ObjectName:
org.apache.camel:context=myContext,type=producers,name=GenericFileProducer(0x1827dd3)
[pache.camel.spring.Main.main()] GenericFileProducer            DEBUG
Starting producer: Producer[file://C:%5CUsers%5CSAND%5CDesktop?noop=true]
[pache.camel.spring.Main.main()] ProducerCache                  DEBUG Adding
to producer cache with key:
Endpoint[file://C:%5CUsers%5CSAND%5CDesktop?noop=true] for producer:
Producer[file://C:%5CUsers%5CSAND%5CDesktop?noop=true]
[pache.camel.spring.Main.main()] DefaultErrorHandler            DEBUG
Redelivery enabled: false on error handler:
DefaultErrorHandler[Instrumentation:to[sendTo(Endpoint[file://C:%5CUsers%5CSAND%5CDesktop?noop=true])]]
[pache.camel.spring.Main.main()] RouteService                   DEBUG
Starting child service on route: REPDownload ->
sendTo(Endpoint[file://C:%5CUsers%5CSAND%5CDesktop?noop=true])
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with ObjectName:
org.apache.camel:context=myContext,type=processors,name="to1"
[pache.camel.spring.Main.main()] RouteService                   DEBUG
Starting child service on route: REPDownload ->
Channel[sendTo(Endpoint[file://C:%5CUsers%5CSAND%5CDesktop?noop=true])]
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with ObjectName:
org.apache.camel:context=myContext,type=routes,name="REPDownload"
[pache.camel.spring.Main.main()] TimerListenerManager           DEBUG Added
TimerListener:
org.apache.camel.management.mbean.ManagedSuspendableRoute@f6aa2e
[pache.camel.spring.Main.main()] SpringCamelContext             DEBUG Route:
REPDownload >>>
EventDrivenConsumerRoute[Endpoint[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
-> Channel[sendTo(Endpoint[file://C:%5CUsers%5CSAND%5CDesktop?noop=true])]]
[pache.camel.spring.Main.main()] SpringCamelContext             DEBUG
Starting consumer (order: 1000) on route: REPDownload
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with ObjectName:
org.apache.camel:context=myContext,type=consumers,name=SftpConsumer(0xd46531)
[pache.camel.spring.Main.main()] SftpConsumer                   DEBUG
Starting consumer:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: initialDelay on bean:
org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@1d86f0a with
value: 1000
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: delay on bean:
org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@1d86f0a with
value: 500
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: useFixedDelay on bean:
org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@1d86f0a with
value: true
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: scheduledExecutorService on bean:
org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@1d86f0a with
value: null
[pache.camel.spring.Main.main()] IntrospectionSupport           DEBUG
Configured property: timeUnit on bean:
org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@1d86f0a with
value: MILLISECONDS
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with ObjectName:
org.apache.camel:context=myContext,type=threadpools,name="SftpConsumer(0xd46531)"
[pache.camel.spring.Main.main()] DefaultExecutorServiceManager  DEBUG
Created new ScheduledThreadPool for source:
Consumer[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
with name:
sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false.
->
org.apache.camel.util.concurrent.SizedScheduledExecutorService@1f1f1d8[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
[pache.camel.spring.Main.main()] SftpConsumer                   DEBUG Auto
creating directory: work/EAP/data/work/local
[pache.camel.spring.Main.main()] SftpConsumer                   DEBUG Not
connected/logged in, connecting to: sftp://u006...@mxea004.getme.com:22
[pache.camel.spring.Main.main()] SftpOperations                 DEBUG Using
StrickHostKeyChecking: no
[pache.camel.spring.Main.main()] SftpOperations                 WARN  JSCH
-> Permanently added 'dseax0111.getme.com' (RSA) to the list of known hosts.
[pache.camel.spring.Main.main()] SftpOperations                 INFO 
Connected to sftp://u006...@mxea004.getme.com:22
[pache.camel.spring.Main.main()] SftpConsumer                   DEBUG
Connected and logged in to: sftp://u006...@mxea004.getme.com:22
[pache.camel.spring.Main.main()] ScheduledPollConsumerScheduler DEBUG
Scheduling poll (fixed delay) with initialDelay: 1000, delay: 500
(milliseconds) for:
Endpoint[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route:
REPDownload started and consuming from:
Endpoint[sftp://u006...@mxea004.getme.com/work/data/local?binary=true&password=xxxxxx&stepwise=false]
[pache.camel.spring.Main.main()] ultManagementLifecycleStrategy DEBUG Load
performance statistics disabled
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Total
1 routes, of which 1 is started.
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache
Camel 2.16.2 (CamelContext: myContext) started in 6.045 seconds
[pache.camel.spring.Main.main()] MainSupport                    DEBUG
Starting Spring ApplicationContext:
org.springframework.context.support.ClassPathXmlApplicationContext@1476a39
[pache.camel.spring.Main.main()] SpringCamelContext             DEBUG
onApplicationEvent:
org.springframework.context.event.ContextStartedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@1476a39:
startup date [Thu Jun 02 14:37:05 IST 2016]; root of context hierarchy]
[t.com/work/data/local] SftpEndpoint                   DEBUG Parameters for
Generic file process strategy {readLockDeleteOrphanLockFiles=true,
readLockRemoveOnRollback=true, readLockCheckInterval=5000, readLock=none,
readLockRemoveOnCommit=false, readLockTimeout=20000,
readLockMarkerFile=true, fastExistsCheck=false, readLockLoggingLevel=WARN,
readLockMinAge=0, readLockMinLength=1}
[t.com/work/data/local] SftpEndpoint                   DEBUG Using Generic
file process strategy:
org.apache.camel.component.file.strategy.GenericFileNoOpProcessStrategy@15c160d
[t.com/work/data/local] SftpConsumer                   DEBUG Took 1.186
seconds to poll: work/EAP/data/work/local
[t.com/work/data/local] SftpConsumer                   DEBUG Took 1.170
seconds to poll: work/EAP/data/work/local
[t.com/work/data/local] SftpConsumer                   DEBUG Took 1.173
seconds to poll: work/EAP/data/work/local
[t.com/work/data/local] SftpConsumer                   DEBUG Took 1.170
seconds to poll: work/EAP/data/work/local
[t.com/work/data/local] SftpConsumer                   DEBUG Took 1.169
seconds to poll: work/EAP/data/work/local
[t.com/work/data/local] SftpConsumer                   DEBUG Took 1.170
seconds to poll: work/EAP/data/work/local
[t.com/work/data/local] SftpConsumer                   DEBUG Took 1.170
seconds to poll: work/EAP/data/work/local
[t.com/work/data/local] SftpConsumer                   DEBUG Took 1.165
seconds to poll: work/EAP/data/work/local*

I tried downloading the file using filezilla and I was able to. I have also
enabled debug and the above rae the logs. Couldn't figure out the exact
issue. Please help.





--
View this message in context: 
http://camel.465427.n5.nabble.com/Unable-to-download-a-file-using-SFTP-in-apache-camel-tp5784110.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to