Question

Today when I was testing the ftp connection to remove server it was printing an error saying Host not found.

At client ftp program I have changed the ftp server from ftp.example.com to server ip adress and as result it works. Any advice on why it works with ip and not by ftp server name?

Troubleshooting:

  • pureFtp services is up and running
  • firewall allows port 21
  • Centos 4 is the OS of the remote machine
  • DNS A entry exists correctly to ftp name
Was it helpful?

Solution

Your DNS resolver is unable to resolve DNS name to IP address for some reason.

FTP does not support virtual hosts (like HTTP), so only difference between using name and IP is resolver.

Common causes include:

  • wrong name entered (misspelling, spaces in name, missing or extra dot, etc)
  • temporary network problems leading to DNS timing out (try "ping ftp.example.com" to see if that works). Also caches in programs can cache negative DNS replies, so you may need to exit/reenter them (or even reboot machine or run your OS functions for flushing cache)
  • wrong or broken DNS resolver (to fix enter right one for your LAN/ISP or some third party like Googles' 8.8.8.8) - note that some local names might work even with wrong DNS resolver server (eg. entering authorative DNS server instead of resolving DNS server IP)
  • authorative DNS server problems, or recent changes which have not yet propagated (flush DNS caches, restart your resolver DNS, or simply wait it out - usually for up to 48h)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top