Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-685

FTPClient.connect() hangs without any timeout and response. It blocks the whole JVM

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.6
    • 3.8.0
    • FTP
    • None
    • OS: Debian 9

      Java Version: 1.8

      Scheduler: On made development using Spring-boot. Multithreading Environment using Runnable Class.

       

    • Important

    Description

      Hello Everybody,

      we implemented a multithread scheduler in order to run many FTP connections (one for each customer). We use these connections to upload /download files from/to remote servers.

      Inside the scheduler, we use a ScheduledThreadPoolExecutor to run our FTP connections (about 50). We run one thread (which instantiates an FTPClient object) for each FTP connection.

      Sometimes, one of those connections tries to connect to the FTP server and the method FTPClient.connect() hangs without any timeout. No log. No server response.
      The connection is blocked as well as the whole JVM. 

      We needed to restart the service to fix the production.

      We already checked the following points during the issue:

      • the server is reachable;
      • No overlapping between run threads;
      • the virtual machine runs correctly;
      • Every other connection works correctly (FTPS, SFTP, CIFS, ...) so far.

      (Production logs attached)

      PULL-REQUEST link: https://github.com/apache/commons-net/pull/51

      Thanks in advance,
      Simone

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Simo385 Simone
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: