Support Questions
Find answers, ask questions, and share your expertise

Urgent need for ListSFTP & FetchSFTP working example

Contributor

I have been struggling with ListSFTP and FetchSFTP (PFA) as none of them seem to be working and ending up with error below -

java.io.FileNotFoundException: Could not perform listing on /home/temp/ because could not find the file on the remote server

ListSFTP

10642-listsftp.png

FetchSFTP

10643-fetchsftp.png

1 ACCEPTED SOLUTION

Accepted Solutions

Setting a remote file to /home/temp/ is wrong. It expects a filename, not a directory. A combination of ListSFTP and FetchSFTP will ensure the filenames are passed to the FestSFTP via a known attribute name.

Here's an example template from the gallery: https://github.com/hortonworks-gallery/nifi-templates/blob/master/templates/List_and_Fetch_SFTP_temp...

View solution in original post

6 REPLIES 6

Setting a remote file to /home/temp/ is wrong. It expects a filename, not a directory. A combination of ListSFTP and FetchSFTP will ensure the filenames are passed to the FestSFTP via a known attribute name.

Here's an example template from the gallery: https://github.com/hortonworks-gallery/nifi-templates/blob/master/templates/List_and_Fetch_SFTP_temp...

View solution in original post

Contributor

Thanks @Andrew Grande for the quick response. The problem however is with ListFile above, as you can see I have specified the path /home/temp to the 'Remote Path', should that not first enlist all the files in that directory, which then I believe will be sent over to FetchFile as flowfile, right?

You removed all details from the configuration. Do you have the 'temp' user? Which user do you use for SFTP login? Normally you wouldn't have access to other users' home directories. Try using a directory outside of /home and set correct permissions on it.

Shouldn't the FetchSFTP Remote File be set to ${path}/${filename} which are the attributes produced by ListSFTP?

Contributor

@Andrew Grande & @Bryan Bende, you guys ROCK!!! It was actually a permissions issue which I fixed. Thank you, appreciate it.

Explorer
@Andrew Grande

I have the same issue but for the GETSFTP processor .Filenotfound exception.

screenshot-from-2018-03-09-13-24-26.png