FTP Failed: Service Check Unable to Connect to Port 21

Server Maintenance | Updated March 2026

When cPanel's service monitoring reports "FTP Failed: Service check failed to complete - Unable to connect to port 21," the Pure-FTPd service has stopped or is unresponsive. This affects all FTP connections for every account on the server. This guide covers how to diagnose and restore the FTP service.

Quick Fix

Restart Pure-FTPd: systemctl restart pure-ftpd. If it won't start, check if the port is in use: fuser 21/tcp. Kill any orphaned process holding the port and restart.

01. Quick Restart

# Check status
systemctl status pure-ftpd

# Restart the service
systemctl restart pure-ftpd

# Verify it's listening
ss -tlnp | grep :21

If the restart succeeds and port 21 shows as listening, the issue is resolved. cPanel's monitoring (ChkServd) should detect the recovery within a few minutes and clear the alert.

02. Diagnosing the Cause

If the restart fails or the service keeps dying, check the logs:

# Check systemd journal for Pure-FTPd
journalctl -u pure-ftpd --no-pager -n 50

# Check syslog for FTP entries
grep -i "pure-ftpd" /var/log/messages | tail -30

# Check if something else is using port 21
fuser -v 21/tcp

03. Common Causes

OOM Killer

The Linux OOM killer terminated the Pure-FTPd process to free memory:

grep -i "killed process" /var/log/messages | grep -i "pure"

If OOM is the cause, the server needs more RAM or other services need to be tuned to use less memory.

Port Conflict

Another process is already bound to port 21. This can happen after a failed restart leaves an orphaned process:

# Find what's on port 21
fuser -v 21/tcp

# Kill it if it's a zombie
fuser -k 21/tcp

# Then restart Pure-FTPd
systemctl restart pure-ftpd

Configuration Error

A broken Pure-FTPd configuration file prevents startup:

# Verify the config
cat /var/cpanel/conf/pureftpd/main

# Rebuild Pure-FTPd config from cPanel settings
/usr/local/cpanel/scripts/setupftpserver pure-ftpd --force

TLS Certificate Issue

If Pure-FTPd is configured for TLS (FTPS) and the certificate is expired or missing, it may fail to start:

# Check the FTP SSL cert
ls -la /etc/pki/tls/certs/pure-ftpd.pem
openssl x509 -in /etc/pki/tls/certs/pure-ftpd.pem -noout -dates

If the cert is expired, regenerate it:

/usr/local/cpanel/bin/checkallsslcerts --force

04. Fixing Persistent Failures

If Pure-FTPd keeps crashing repeatedly:

# Check for core dumps
ls -la /var/log/pure-ftpd/

# Check ulimits
cat /proc/$(pgrep pure-ftpd | head -1)/limits

# Increase max connections if needed (edit via WHM > FTP Server Configuration)
# Or manually:
echo "MaxClientsNumber 150" > /var/cpanel/conf/pureftpd/local

# Rebuild and restart
/usr/local/cpanel/scripts/setupftpserver pure-ftpd --force
systemctl restart pure-ftpd

05. Monitoring

cPanel's ChkServd (Tailwatchd) automatically monitors Pure-FTPd and attempts to restart it when it detects a failure. Verify monitoring is enabled:

# Check if FTP monitoring is active
whmapi1 configureservice service=ftpd

# Enable monitoring if disabled
whmapi1 configureservice service=ftpd enabled=1 monitored=1

FTP Still Down?

If Pure-FTPd won't stay running after troubleshooting, there may be a deeper issue with the server configuration or hardware. Open a priority ticket.

Open a Support Ticket

Quick Recap: FTP Service Failure

  1. Restart first - systemctl restart pure-ftpd
  2. Check port 21 - fuser -v 21/tcp to see if something is blocking it
  3. Check OOM killer - grep "killed process" /var/log/messages
  4. Verify TLS cert - Expired FTP certificates can prevent startup
  5. Rebuild config - /usr/local/cpanel/scripts/setupftpserver pure-ftpd --force

Last updated March 2026 · Browse all Server Maintenance articles

  • 2 Users Found This Useful

Was this answer helpful?

Related Articles

PHP Startup: Unable to Load Dynamic Library

Server Maintenance | Updated March 2026 "PHP Startup: Unable to load dynamic library" errors...

FSCK Options and Maintenance

Server Maintenance | Updated 2026 fsck (file system check) scans and repairs Linux...

SpamAssassin Command Line Bayesian Learn Command cPanel

Server Maintenance | Updated 2026 SpamAssassin's Bayesian filter learns from your email to...

Whitelisting Multiple IPs with ModSecurity

Server Maintenance | Updated March 2026 ModSecurity (our web application firewall)...

Error: rpmdb Open Failed with cPanel

Server Maintenance | Updated March 2026 The "rpmdb open failed" error means the RPM database...



Save 30% on web hosting - Use coupon code Hosting30