Handling Mule FTP Connector Error on CloudHub 2.0

Author: Ashutosh Tripathi


In all Mule applications deployed to CloudHub 2.0 with the default FTP connector configuration, an intermittent error occurs. The error message received is “FTP response 421 received. Server closed connection.” Although re-connection strategy defined in the FTP connector helps in reconnecting, the task is to resolve this error completely and prevent it from appearing in the logs.


This blog provides a step-by-step approach on how to overcome the intermittently occurring FTP connector error, along with the constraints that may arise after applying the solution.

Detailed description

The detailed error description is as follows.

An exception was found while attempting to change the transfer mode to class org.mule.extension.ftp.api.ftp.FtpTransferMode. The FTP reply code is 421, and the error is caused by org.apache.commons.net.ftp.FTPConnectionClosedException: FTP response 421 received. Server closed connection.

Steps to resolve the error:
  1. Update the FTP connector to the latest version (1.8.3).
  1. To disable the pooling profile for the FTP connector, follow these steps:
    1. Open the FTP connector configuration.
    2. Inside the General section, click on the Advanced tab.
    3. Slide the bar to the bottom, where you will find the Pooling profile option.
    4. Refer to the screenshot below for further guidance.
  1. Instead of the default pooling configuration, click on the drop-down and select the “Edit inline” option. Then, make the following changes as shown in the screenshot below to update the values to 0, ensuring that no connection remains active when there is nothing to transfer.
Points to remember:
  1. Before making the above configuration changes, it is important to take the time to read about the significance of each field mentioned in the pooling configuration via the Mule FTP connector documentation. Failure to do so and changing random field values without proper understanding may negatively impact performance.
  2. Considering the load on the application, please perform the above configuration changes, taking into account that in the current scenario, setting up multiple instances of connection with the FTP server may not be possible.

We use cookies on this site to enhance your user experience. For a complete overview of how we use cookies, please see our privacy policy.