You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/01/04 16:41:00 UTC
[jira] [Commented] (NIFI-9507) FetchSFTP spawns multiple keep-alive threads on failed connections
[ https://issues.apache.org/jira/browse/NIFI-9507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17468725#comment-17468725 ]
ASF subversion and git services commented on NIFI-9507:
-------------------------------------------------------
Commit 4f28b28ba2b8ad049f4477335e9a85135cd0d0c1 in nifi's branch refs/heads/NIFI-9428 from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=4f28b28 ]
NIFI-9507 This closes #5617. Corrected SSH Client handling on connect failures
- Refactored SSH Client configuration and connection to SSHClientProvider
- Implemented exception handling for configuration and connection failures
- Named SSH keep-alive thread for improved runtime tracking
- Closed SSH Client and interrupted keep-alive thread on configuration failures
- Added missing Compression Property to ListSFTP
- Corrected Hostname and Port property descriptors in ListSFTP
Signed-off-by: Joe Witt <jo...@apache.org>
> FetchSFTP spawns multiple keep-alive threads on failed connections
> ------------------------------------------------------------------
>
> Key: NIFI-9507
> URL: https://issues.apache.org/jira/browse/NIFI-9507
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.12.0, 1.15.1
> Reporter: David Handermann
> Assignee: David Handermann
> Priority: Major
> Fix For: 1.16.0, 1.15.2
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The {{FetchSFTP}} processor relies on the shared {{SFTPTransfer}} class to handle SFTP communication using the SSHJ library starting in NiFi 1.12.0. The {{SFTPTransfer}} class instantiates and configures an {{SSHClient}} based on processor properties, calling the {{connect}} method after initial configuration.
> The {{SSHClient.connect}} method can throw an {{IOException}} on failure to reach the remote SFTP server, but the NiFi {{SFTPTransfer}} class does not close in the {{{}SSHClient{}}}. Although {{FetchSFTP}} catches the {{IOException}} in the parent {{FetchFileTransfer.onTrigger}} method, the processor never closes the failed {{SSHClient}} because {{SFTPTransfer}} never assigned the instance variable.
> The creation and lifecycle of the {{SSHClient}} inside {{SFTPTransfer}} should be adjusted to ensure closure of {{SSHClient}} and the associated keep-alive thread.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)