Bobcares

FTP error 421 service not available – Why are you kicked out of FTP?

by | Feb 22, 2019

FTP errors are bothersome.

And, it becomes more troublesome when you spend the whole day resolving these errors.

One such FTP error is “421 service not available“.

At Bobcares, we help server owners resolve such FTP errors as part of our Dedicated Support Services.

Today, let’s discuss the top 3 reasons for this error and how we fix them.

 

FTP error 421 service not available – A Quick Glance

FTP error code 4xx means that the connection hasn’t been attempted and the requested action hasn’t taken place. But, this condition is temporary, and the action may be requested again.

And, FTP error 421 service not available means that the connection to the remote server can’t be established. FTP clients such as Filezilla returns the error like this:

421 Service not available, remote server has closed connection.

 

 

FTP error 421 service not available – Causes & Fixes

Now, let’s discuss the common reasons for this error and how our Dedicated Engineers fix them.

1) Invalid FTP host

This error can occur when the FTP server can’t determine the IP address of the server by the hostname. And, the server logs(/var/log/messages) show this error.

getaddrinfo 'Hostname_Is_Here' error: Name or service not known warning: unable to determine IP address of 'host.domain.com domain
How we fix?

Here, our Support Experts first check the connectivity to the FTP host using the ping command.

ping host.domain.com

 

If ping doesn’t respond, we add the correct hostname in the following server configuration files.

/etc/hosts
/etc/sysconfig/network

 

Most importantly, we restart the network service to reflect these changes.

/etc/init.d/network

 

On the other hand, on Plesk servers, we change the hostname from Tools & Settings > Server Settings.

 

2) Firewall restrictions

Another probable reason for this error is the incorrect firewall configurations or firewall restrictions.

We’ve seen instances where the remote server blocks connections from an IP address or IP address range. The IP can be blocked due to abnormal activities, too many connections, etc.

Similarly, another possibility is that the user is being blocked from making outbound connections either at the ISP end or at their local firewall. We’ve seen cases where third party firewall or antivirus on the system blocking FTP connections. Also, ISPs can block the normal outbound FTP traffic.

 

How we fix?

Firstly, our Support Experts ensure that the customer’s IP address isn’t blocked in the remote server. For example, we use the below command to determine if the customer’s IP address xx.xx.xx.xx is blocked.

csf -g xx.xx.xx.xx

 

And, if the IP is blocked, we’ll immediately remove the block and restore the FTP access. Later, we update the reason for the block and the remedial measures to the customer.

If there are no problems on the server side, we update customers to disable their security applications such as Antivirus, Windows firewall, etc. one by one. This helps us to identify which application is causing problems.

Alternatively, if the issue is at the ISP end, we get the traceroute results from the customer. This helps us to identify if the issue lies at the intermediate level.

Most importantly, if the customers are blocked at the ISP or local firewall level, we always suggest them to use SFTP for connection as it uses SSH for connecting.

 

3)  FTP service configuration errors

Similarly, another variation of this error in ProFTP servers is given below.

test.com proftpd[130008] 127.0.0.1: Failed binding to ::, port 21: Address already in use
test.com proftpd[130008] 127.0.0.1: Check to see if inetd/xinetd, or another proftpd instance, is already using ::, port 21

 

This error usually occurs when port 21 is already used by another application. It can also happen when the ProFTP service is stuck on the server. Similarly, errors in the FTP service configuration file can also create problems.

 

How we fix?

Firstly, our Support Engineers check the services listening on FTP port 21 using the netstat command.

netstat -plnt | grep :21

 

And, if we find that this port is used by multiple applications or another instance of proftpd, we’ll reconfigure these applications on alternate ports. For example, in plesk servers, we always ensure that the ServerType parameter is set to inetd in the ProFTP configuration file.

ServerType inetd

 

Here, the inetd/xinetd service listens on port 21 for connection requests, then start the proftpd and pass the connection off.

In case if we find that the FTP service is stuck on the server, we kill the dead process and restart the service using the below commands.

ps aux | grep proftpd
kill -9 PID
service xinetd restart

 

In addition to that, we ensure that the FTP configuration files(/etc/proftpd.conf and /etc/vsftpd.conf) are intact.

Recently, we were contacted by a customer that he can’t connect to FTP. The logs showed missing /var/run/proftpd/ directory. When we checked, the ProFTPd configuration file(/etc/proftpd.conf) was referring to this folder. But, this folder wasn’t created in the server. So, our Support Engineers went ahead and created the folder /var/run/proftpd/ to fix the issue.

[Need an expert to resolve your ongoing FTP problems? Our Experienced Support Experts can help you here.]

 

Conclusion

In short, FTP error 421 service not available can occur due to firewall restrictions, invalid FTP host and more. Today, we’ve discussed the top 3 reasons for this error and how our Dedicated Engineers fix them.

” width=”20″ height=”20″>

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

2 Comments

  1. Matt

    Im getting the 421 error “too many (15) connections” from Filezilla. I am at a loss as to why this is happening, it never happened before. My host said FTP is working fine on their end. I’ll be able to upload about 750 files, out of 17,000 I need to upload, then cant connect again.

    Reply
  2. Redserver

    I was also getting 421 error in my website while connecting to my FTP client “FileZilla”. Thankful to you for such a wonderful article. It helped me a lot!
    Keep writing like this!

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF