Sidebar

I get an error when doing an SFTP destination node to a write only sftp server where I do not have read permissions

0 votes
441 views
asked Sep 21, 2021 by nathan-c-4426 (260 points)
I have setup a destination node that is supposed to receive the processed messages as files however I'm getting the following error:

FTPReceiver error (consecutive errors=1): org.apache.camel.component.file.GenericFileOperationFailedException: Cannot list directory: .
at org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:597)
at org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:90)
at org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:52)
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:119)
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
at com.qvera.qie.engine.in.FTPReceiver.checkForMessage(FTPReceiver.java:143)
at com.qvera.qie.engine.in.Receiver.scheduledCheckForMessage(Receiver.java:422)
at com.qvera.qie.engine.in.Receiver.run(Receiver.java:262)
at java.lang.Thread.run(Unknown Source)
Caused by: 2:
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
at org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:588)
... 9 more

1 Answer

0 votes

It's quite common for certain SFTP servers to disallow read access.   This is done often times when an sftp endpoint is shared by multiple parties where they can all drop off files but not see each other's files.

By default the internal SFTP software used by Qvera does a folder listing of the destination to check for conflicting files in order to avoid overwriting an existing file.   There is an option that overrides this behavior that needs to be set:

Once those options are set any files sent to the server simply write to the SFTP server and will overwrite any existing files already existing out on the sftp server.

 

 

answered Sep 21, 2021 by nathan-c-4426 (260 points)
...