Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Dizzfire
Contributor III
Contributor III

Camel - SFTP - Cannot change directory to: E:

Hi,

I developed an Route with cFTP component. In this cFTP component, I used SFTP connection.

My Runtime server is on Linux OS and my target server is on Windows OS.

0695b00000KAX4BAAX.jpg

By default, on the windows server, the directory is C:/Users/talend/. I would like change this path by E:/interfaces/outputs/

When I tried, a SFTP connection without change directory, I have not a issue. However, when i tried SFTP connection with change directory, I get this message:

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot change directory to: E:

    at org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:658) ~[?:?]

    at org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:646) ~[?:?]

    at org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:117) ~[?:?]

    at org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:86) ~[?:?]

    at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:128) ~[bundleFile:2.24.2]

    at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174) [bundleFile:2.24.2]

    at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101) [bundleFile:2.24.2]

    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_275]

    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_275]

    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_275]

    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_275]

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_275]

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_275]

    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]

Caused by: com.jcraft.jsch.SftpException: No such file

    at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873) ~[jsch-0.1.55.jar:?]

    at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225) ~[jsch-0.1.55.jar:?]

    at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:343) ~[jsch-0.1.55.jar:?]

    at org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:656) ~[?:?]

    ... 13 more

Do you have an idea on my issue ?

Thnak you in advance

Anthony

Labels (3)
1 Solution

Accepted Solutions
CSen
Contributor II
Contributor II

Hello,

 

It's because Camel FTP component does not support Absolute path : https://camel.apache.org/components/2.x/ftp-component.html#_uri_format (also the case in Camel 3 version).

The component is currently trying to find "e:/interfaces/outputs/" in the folder it is connected to.

So to make it work, either :

  • you use relative path such as "../../../e/interfaces/outputs/" (not sure it work when switching mouting point on "E:")
  • you change SFTP user CHROOT to "E:/interfaces/outputs/" folder (or a parent one).

 

Regards,

View solution in original post

2 Replies
gjeremy1617088143

hi, does the route have the permission to acces E: on the target server ?

Send me love and kudos

CSen
Contributor II
Contributor II

Hello,

 

It's because Camel FTP component does not support Absolute path : https://camel.apache.org/components/2.x/ftp-component.html#_uri_format (also the case in Camel 3 version).

The component is currently trying to find "e:/interfaces/outputs/" in the folder it is connected to.

So to make it work, either :

  • you use relative path such as "../../../e/interfaces/outputs/" (not sure it work when switching mouting point on "E:")
  • you change SFTP user CHROOT to "E:/interfaces/outputs/" folder (or a parent one).

 

Regards,