Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-9507

FetchSFTP spawns multiple keep-alive threads on failed connections

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.12.0, 1.15.1
    • 1.16.0, 1.15.2
    • Extensions
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              exceptionfactory David Handermann
              exceptionfactory David Handermann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h