Thanks,

I am getting an exception when I try to GET a file from SFTP.
My route is set up as follows

                <route>
                        <from
uri="sftp://xxxxx...@xxx.xx.xx.xxx:22///XXXX.XX.XXXXX?password=XXXXXXX&amp;noop=true&amp;binary=true&amp;delay=60000&amp;stepwise=false"/>
                        <to uri="file:/opt/share/SFTP_OUT"/>
                </route>

The exception is

[2013-08-12 14:46:04,751 Camel (camel) thread #2 -
sftp://xxxxx...@xxx.xx.xx.xxx:22///XXXX.XX.XXXXX] SftpConsumer                  
ERROR Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot retrieve file: /DTS4.UP.G2TLR/BOOK1.CSV.D0806.T4748300]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
retrieve file: /DTS4.UP.G2TLR/BOOK1.CSV.D0806.T4748300
        at
org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:516)[camel-ftp-2.9.0.jar:2.9.0]
        at
org.apache.camel.component.file.remote.SftpOperations.retrieveFile(SftpOperations.java:473)[camel-ftp-2.9.0.jar:2.9.0]
        at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:333)[camel-core-2.9.0.jar:2.9.0]
        at
org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:94)[camel-ftp-2.9.0.jar:2.9.0]
        at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:175)[camel-core-2.9.0.jar:2.9.0]
        at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:136)[camel-core-2.9.0.jar:2.9.0]
        at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:140)[camel-core-2.9.0.jar:2.9.0]
        at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[camel-core-2.9.0.jar:2.9.0]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)[:1.6.0_38]
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown
Source)[:1.6.0_38]
        at java.util.concurrent.FutureTask.runAndReset(Unknown 
Source)[:1.6.0_38]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown
Source)[:1.6.0_38]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown
Source)[:1.6.0_38]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)[:1.6.0_38]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)[:1.6.0_38]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)[:1.6.0_38]
        at java.lang.Thread.run(Unknown Source)[:1.6.0_38]


Its definitively not an authentication issue, since I can see that I am able
to connect successfully (as shown in below logs)


[2013-08-12 14:46:02,661 Camel (camel) thread #2 -
sftp://F7DGTLRW@207.45.41.162:22///DTS4.UP.G2TLR] SftpOperations                
INFO  JSCH -> Next authentication method: password
[2013-08-12 14:46:02,737 Camel (camel) thread #2 -
sftp://F7DGTLRW@207.45.41.162:22///DTS4.UP.G2TLR] SftpOperations                
INFO  JSCH -> Authentication succeeded (password).
[2013-08-12 14:46:02,763 LockManager] DbLockManager                  INFO 
Table Lock result:true
[2013-08-12 14:46:03,655 Camel (camel) thread #2 -
sftp://F7DGTLRW@207.45.41.162:22///DTS4.UP.G2TLR] SftpOperations                
INFO  Connected to sftp://F7DGTLRW@207.45.41.162:22
[2013-08-12 14:46:03,655 Camel (camel) thread #2 -
sftp://F7DGTLRW@207.45.41.162:22///DTS4.UP.G2TLR] SftpConsumer                  
INFO  Connected and logged in to: sftp://F7DGTLRW@207.45.41.162:22
[2013-08-12 14:46:03,766 LockManager] DbLockManager                  INFO 
Table Lock result:true


----------------


If I try to connect to SFTP site, i can see the following

sftp> CD //DTS4.UP.G2TLR
sftp> LS //DTS4.UP.G2TLR
//DTS4.UP.G2TLR/BOOK1.CSV.D0713.T0903622      
//DTS4.UP.G2TLR/BOOK1.CSV.D0713.T2200378      
//DTS4.UP.G2TLR/BOOK1.CSV.D0713.T2208865      
//DTS4.UP.G2TLR/BOOK1.CSV.D0713.T2213966      
//DTS4.UP.G2TLR/BOOK1.CSV.D0806.T4633586       
//DTS4.UP.G2TLR/BOOK1.CSV.D0806.T4748300      
//DTS4.UP.G2TLR/S40750.D0713.T0644847 


=> Just to confirm that the files do exist in the FTP Site.


regards
D






--
View this message in context: 
http://camel.465427.n5.nabble.com/SFTP-Support-to-execute-GET-PUT-commands-tp5736198p5737153.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to