FTPMonitor / Errors / ECONNREFUSED on port 21

ECONNREFUSED on port 21

Why FTP port 21 returns connection refused, and how to isolate service-down vs firewall vs wrong host/port.

ECONNREFUSED means the host responded and actively rejected the TCP connection.

This usually indicates the service isn’t listening on that port, or a device is rejecting connections.

Common causes

  • FTP service is not running/listening on port 21
  • Wrong host or wrong port (FTP may be on a non-standard port)
  • Firewall/device sends RST (reject) instead of dropping traffic

Fix checklist

  1. Confirm FTP is enabled and listening on port 21 (server-side).
  2. Confirm the vendor/admin-provided port (FTP is not always 21).
  3. Check firewall/security group rules for explicit rejects.
  4. Try from inside the same network/VPN if the host is internal-only.

Quick commands

nc -vz <host> 21
telnet <host> 21
Related
Diagnostics powered by FTPMonitor CLI