You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by janvandeklok <ja...@caci.nl> on 2015/12/18 16:07:49 UTC

SFTP is not finding files to download

Hello, I'm new to Camel and just started out using JBoss Fuse Version:
8.1.0.GA

I created a simple route to download files from an SFTP server. I tried all
kind of settings (including every combination of stepwise and passiveMode 
(yes, I did read the documentation :-)) But so far I'm not able to download
files from a linux dir. I've no clue where to look now. 

Is there some magic property I need to set??? The SFTP
connection(Username/password) seems to be OK. 
It looks like  the polling mechanism can't see the 5 files that are in the
home/oracle/interfaces/olink/UIT_OSI directory. These 5 files are created
with the same profile (oracle in my case) and are fully accessible. I don't
see any errors in the the log when running the route.

Hope someone can help me out......
Best regards,

Jan van de Klok
------------------------------------------------------------------------------------------

This is my route:
 <camelContext trace="true"
id="context-ed283359-61e1-4d85-a82b-0b501e60ca48"
xmlns="http://camel.apache.org/schema/spring">
  <route>
    <from
uri="sftp:x.y.z:22/home/oracle/interfaces/olink/UIT_OSI?throwExceptionOnConnectFailed=true&amp;directoryMustExist=true&amp;exchangePattern=InOut&amp;password=xxxxx&amp;username=oracle&amp;delay=15000&amp;autoCreate=false&amp;initialDelay=200&amp;maxMessagesPerPoll=100&amp;readLockLoggingLevel=ERROR&amp;readLockMarkerFile=false&amp;startingDirectoryMustExist=true&amp;passiveMode=true"/>
    <log message="&gt;&gt;  file found.... download to local system now
...." id="1"/>
    <to
uri="file:target/messages?keepLastModified=true&amp;allowNullBody=true&amp;noop=true"/>
  </route>
</camelContext>

This is the last part of the trace:

[racle/interfaces/olink/UIT_OSI] ScheduledPollConsumer          TRACE
doRun() done with idleCounter=1, errorCounter=0
[racle/interfaces/olink/UIT_OSI] ScheduledPollConsumer          TRACE
Scheduled task completed on:
Endpoint[sftp://egypte.psb.local:22/home/oracle/interfaces/olink/UIT_OSI?autoCreate=false&delay=15000&directoryMustExist=true&exchangePattern=InOut&fileName=move.me&initialDelay=200&maxMessagesPerPoll=100&passiveMode=true&password=xxxxxx&readLockLoggingLevel=ERROR&readLockMarkerFile=false&startingDirectoryMustExist=true&throwExceptionOnConnectFailed=true&username=oracle]
[racle/interfaces/olink/UIT_OSI] ScheduledPollConsumer          TRACE
Scheduled task started on:  
Endpoint[sftp://egypte.psb.local:22/home/oracle/interfaces/olink/UIT_OSI?autoCreate=false&delay=15000&directoryMustExist=true&exchangePattern=InOut&fileName=move.me&initialDelay=200&maxMessagesPerPoll=100&passiveMode=true&password=xxxxxx&readLockLoggingLevel=ERROR&readLockMarkerFile=false&startingDirectoryMustExist=true&throwExceptionOnConnectFailed=true&username=oracle]
[racle/interfaces/olink/UIT_OSI] ScheduledPollConsumer          TRACE
Starting to poll:
Endpoint[sftp://egypte.psb.local:22/home/oracle/interfaces/olink/UIT_OSI?autoCreate=false&delay=15000&directoryMustExist=true&exchangePattern=InOut&fileName=move.me&initialDelay=200&maxMessagesPerPoll=100&passiveMode=true&password=xxxxxx&readLockLoggingLevel=ERROR&readLockMarkerFile=false&startingDirectoryMustExist=true&throwExceptionOnConnectFailed=true&username=oracle]
[racle/interfaces/olink/UIT_OSI] SftpConsumer                   TRACE
prePollCheck on sftp://oracle@egypte.psb.local:22
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
getCurrentDirectory()
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Current dir: /home/oracle
[racle/interfaces/olink/UIT_OSI] SftpConsumer                   TRACE
doPollDirectory from absolutePath: home/oracle/interfaces/olink/UIT_OSI,
dirName: null
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
changeCurrentDirectory(home/oracle/interfaces/olink/UIT_OSI)
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Compacted path: home/oracle/interfaces/olink/UIT_OSI ->
home/oracle/interfaces/olink/UIT_OSI using separator: /
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
getCurrentDirectory()
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Current dir: /home/oracle
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Changing directory: home
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Changing directory: oracle
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Changing directory: interfaces
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Changing directory: olink
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Changing directory: UIT_OSI
[racle/interfaces/olink/UIT_OSI] SftpConsumer                   TRACE
Polling directory: home/oracle/interfaces/olink/UIT_OSI
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
listFiles(.)
[racle/interfaces/olink/UIT_OSI] SftpConsumer                   TRACE Found
2 in directory: home/oracle/interfaces/olink/UIT_OSI
[racle/interfaces/olink/UIT_OSI] SftpConsumer                   TRACE
SftpFile[fileName=., longName=drwxrwxr-x    2 oracle   oracle       4096 Dec
18 14:32 ., dir=true]
[racle/interfaces/olink/UIT_OSI] SftpConsumer                   TRACE
SftpFile[fileName=.., longName=drwxrwxr-x    4 oracle   oracle       4096
Dec 18 14:32 .., dir=true]
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
changeCurrentDirectory(/home/oracle)
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Compacted path: /home/oracle -> /home/oracle using separator: /
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
getCurrentDirectory()
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Current dir: /home/oracle/home/oracle/interfaces/olink/UIT_OSI
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
getCurrentDirectory()
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Current dir: /home/oracle/home/oracle/interfaces/olink/UIT_OSI
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Changing directory: ..
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Changing directory: ..
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Changing directory: ..
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Changing directory: ..
[racle/interfaces/olink/UIT_OSI] SftpOperations                 TRACE
Changing directory: ..
[racle/interfaces/olink/UIT_OSI] SftpConsumer                   DEBUG Took
0.301 seconds to poll: home/oracle/interfaces/olink/UIT_OSI
[racle/interfaces/olink/UIT_OSI] SftpConsumer                   TRACE
postPollCheck on sftp://oracle@egypte.psb.local:22
[racle/interfaces/olink/UIT_OSI] ScheduledPollConsumer          TRACE Polled
0 messages
[racle/interfaces/olink/UIT_OSI] ScheduledPollConsumer          TRACE
Finished polling:
Endpoint[sftp://egypte.psb.local:22/home/oracle/interfaces/olink/UIT_OSI?autoCreate=false&delay=15000&directoryMustExist=true&exchangePattern=InOut&fileName=move.me&initialDelay=200&maxMessagesPerPoll=100&passiveMode=true&password=xxxxxx&readLockLoggingLevel=ERROR&readLockMarkerFile=false&startingDirectoryMustExist=true&throwExceptionOnConnectFailed=true&username=oracle]
[racle/interfaces/olink/UIT_OSI] ScheduledPollConsumer          TRACE
doRun() done with idleCounter=2, errorCounter=0
[racle/interfaces/olink/UIT_OSI] ScheduledPollConsumer          TRACE
Scheduled task completed on:
Endpoint[sftp://egypte.psb.local:22/home/oracle/interfaces/olink/UIT_OSI?autoCreate=false&delay=15000&directoryMustExist=true&exchangePattern=InOut&fileName=move.me&initialDelay=200&maxMessagesPerPoll=100&passiveMode=true&password=xxxxxx&readLockLoggingLevel=ERROR&readLockMarkerFile=false&startingDirectoryMustExist=true&throwExceptionOnConnectFailed=true&username=oracle]





--
View this message in context: http://camel.465427.n5.nabble.com/SFTP-is-not-finding-files-to-download-tp5775254.html
Sent from the Camel - Users mailing list archive at Nabble.com.