- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Urgent need for ListSFTP & FetchSFTP working example
- Labels:
-
Apache NiFi
Created on ‎12-21-2016 06:16 PM - edited ‎08-18-2019 04:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
FetchSFTP
Created ‎12-21-2016 06:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
Created ‎12-21-2016 06:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
Created ‎12-21-2016 06:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Created ‎12-21-2016 06:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎12-21-2016 08:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shouldn't the FetchSFTP Remote File be set to ${path}/${filename} which are the attributes produced by ListSFTP?
Created ‎12-23-2016 05:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Andrew Grande & @Bryan Bende, you guys ROCK!!! It was actually a permissions issue which I fixed. Thank you, appreciate it.
Created ‎03-09-2018 08:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same issue but for the GETSFTP processor .Filenotfound exception.
