For those who are wondering why ProFTPd (no valid server configured) is not starting , here is your solution🙂.
I was struggling to get this working in one of the server (see below for the error) but no luck even after several repeats of usual tips, ie., restart/reinstall (/etc/init.d/proftpd restart) – simply nothing.
This is the error I was getting each time when I try to start ProFTPd:
Checking syntax of configuration file
– warning: unable to determine IP address of ‘example.com′
– error: no valid servers configured
– Fatal: error processing configuration file ‘/etc/proftpd.conf’
Following solution works with all Debian based Linux Distribution. Others, placement of the config files may vary with other Linux distribution, please find the correct path to the config file(s) that I have mentioned in the solution.
After searching for a solution I end up with a link http://www.savelono.com/linux/solved-proftp-will-not-start-after-install-in-fedora-11.html (but this is for GUI, no problem with the background job). I confirm that my hosts (/etc/hosts) file has an entry for example.com with the proper IP address.
This was driving me crazy until I realized that the problem could be in resolving the IP address of a hostname. Since everything seems to be perfect from ProFTPd, the only problem is determining the IP address of the hostname (cat /etc/hostname). After searching (with massive keyword filter ;-)) I ended up with a link (http://linux.derkeiler.com/Mailing-Lists/Debian/2004-03/3908.html) which gave me a hint “nsswitch” – GOTCHA. My doubt was correct, ProFTPd is not able to resolve the IP address of a hostname.
ProFTPd was trying hard to get the IP of the hostname and it was failed to resolve. Generally resolver library asks NSSwitch to resolve the IP address and it controls how services such as the resolver library, NIS, NIS+ and local files such as /etc/hosts and /etc/shadow interact.
When I added the line
hosts: file dns
in my /etc/nsswitch.conf file and I restarted the ProFTPd once again, this time it did work🙂. This paid all my hard-work, I got the solution🙂.
- Set Up a Secure FTP Server: Linux Debian Guide (brighthub.com)