- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
ListSftp Processor closes connection?
- Labels:
-
Apache NiFi
Created on ‎06-13-2018 02:02 PM - edited ‎09-16-2022 06:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello there,
I'm using nifi to retrieve files from an sftp server. This server grants multiple access to multiple users.
Nifi accesses the server as different users to dowload files.
It seems that ListSftp processor doesn't close connection, infact - having a maximum amount of connections per ip- i get a an acces error saying i reached maximum amount of connections per ip.
checking the source code, in
package org.apache.nifi.processors.standard.util.SFTPTransfer
in
getListing
method
I cannot see any
close()
request.
The only
close()
method call i can see is in
getChannel
method, but i guess this is not the case after listing content in sftp.
Is this a known issue, or am I missing something?
Thanks a lot for your help!
Created ‎06-13-2018 02:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ListSFTP extends ListFileTransfer and that class has performListing() which does:
final FileTransfer transfer = getFileTransfer(context);
final List<FileInfo> listing;
try {
listing = transfer.getListing();
} finally {
IOUtils.closeQuietly(transfer);
}
The FileTransfer here is the SFTPTransfer, so it is being closed in a finally block every time.
Created ‎06-13-2018 02:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ListSFTP extends ListFileTransfer and that class has performListing() which does:
final FileTransfer transfer = getFileTransfer(context);
final List<FileInfo> listing;
try {
listing = transfer.getListing();
} finally {
IOUtils.closeQuietly(transfer);
}
The FileTransfer here is the SFTPTransfer, so it is being closed in a finally block every time.
