How to resolve 421 service not available and other issues with FTP service
What are the steps to resolve the error ‘421 service not available’ in case of ftp?
Hello, in this article we cover several possible steps and solutions if you are finding `421 service not available` when attempting to connect to your server via FTP. This article may also be helpful if you are finding other similar problems or issues when attempting to establish a successful connection while using your FTP client from your local workstation.
This article applies to systems running CentOS or linux distributions.
Step 1) Rule out DNS issue
If you are attepting to connect with your server hostname or domain, it is worth ruling out a possible DNS or resolution issue. To accomplish this, the easiest way is to simply use your servers IP address instead of the hostname or domain.
See examples below how this may look in your FTP Client. We recommend if unfamliar with FTP to consider installing/using FileZilla, it’s free! https://filezilla-project.org/download.php
Step 2) Try SFTP
If you are still finding an issue when attempting with IP directly, we would recommend trying SFTP protocol and changing port connecting with to match your servers SSH port. By default this can be 22 but on many systems this can be different in order to enhance security and prevent common brute force attempts. If you want to connect to your server with root user and not a secondary or FTP user, some systems require the use of SFTP – this is a more secure protocol and we recommend consider using SFTP whenever possible for best practice.
If you wish to learn more about further enhancing system security, check out some of our other enhancements we offer: https://www.hivelocity.net/enhancements/ddos-protection/
Step 3) Server blocking or service configuration
If you find this issue with SFTP as well, this could be the result of firewall rules of the system or perhaps a system misconfugration causing you to not be able to connect properly.
a) cPanel systems, see b for other distributions
If you are running a cPanel system, the two likely places you would need to allow your IP address in order to allow yourself access to the system, you can allow your IP from your WHM panel.
First, gather your workstation IP from URL here, this is what you will use to replace YourIPAddress in below items:
You can access your WHM panel one of two ways:
WHM | https://YourServerIPAddressHere:2087 (ignore security warning and proceed) or WHM | https://YourServerHostname:2087
Once in your WHM panel, you can allow in both locations:
WHM -> ConfigServer Security & Firewall -> Quick allow
WHM -> CPhulkd -> Whitelist
If you prefer to allow from SSH or Terminal instead of within WHM, you can perform below to allow:
$ csf -a YourIPAddress
$ /scripts/cphulkdwhitelist YourIPAddress
b) Other Linux distributions
Other linux systems or installations may use other firewalls. For example, Ubuntu may be running ufw while other non panel Redhat or Centos may be using iptables or firewalld. It would be recommended to attempt to temporarily stop these or attempt to whitelist/allow
Step 4) Issue a support ticket
If you have exhausted your efforts or would like some assistance checking / replicating the issue further, please reach out to us from your my.hivelocity.net account if possible -> Support and provide your server credentials within the Encrypted field for best possible security and support.
If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here:
We are also available to you through our phone / live chat systems 24x7x365
If you thought that was helpful, check out this article on How to mount your cloud storage drive on your CentOS, RHEL or Fedora systems from our Impressive Support staff
META: 421 service not available, remote server has closed connection, ftp 421 service not available, ftp error 421, sftp, ftpd, port 21, custom ports, security, linux, centos, ubuntu, firewall, cpanel, whm, csf, cphulkd, iptables, firewalld