Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Urgent need for ListSFTP & FetchSFTP working example

avatar
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

avatar

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

avatar

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...

avatar
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?

avatar

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.

avatar
Master Guru

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

avatar
Contributor

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

avatar
Rising Star
@Andrew Grande

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

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