Resolving FTP 421 Error
What are the steps to resolve the error ‘421 service not available’ in case of ftp?
Hello, in this article we’ll cover several possible steps and solutions for resolving an error “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 attempting 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 server’s IP address instead of the hostname or domain.
Below are two examples of how this may look in your FTP Client. If you are unfamiliar with FTP, we recommend installing/using FileZilla. Best of all, it’s free! You can download the latest version through FileZilla’s official website.
Step 2) Try SFTP
If you are still finding an issue when attempting to connect with your IP directly, we would recommend trying SFTP protocol and changing the connecting port 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, including 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 misconfiguration causing you to not be able to connect properly.
a) cPanel Systems
For other distributions, see b) Other Linux Distributions
If you are running a cPanel system, there are two likely places you would need to allow your IP address in order to allow yourself access to the system. Allowing your IP can be done from within your WHM panel.
First, gather your workstation IP using our free IP address checking tool. This is what you will use to replace “YourIPAddress” in the items below.
Next, you’ll need to access your WHM panel. This can be done in one of two ways:
WHM | https://YourServerIPAddressHere:2087 (ignore security warning and proceed)
WHM | https://YourServerHostname:2087
Once in your WHM panel, you’ll want to allow your IP in both of the following 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 the commands 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’s 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, if possible, please reach out to us from your my.hivelocity.net account -> Support and provide your server credentials within the Encrypted field for best possible security and support.
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