if you use glftpd as ftp server, you might run into
user@server:/# ftp localhost 12345
Connected to localhost.
421 Service not available, remote server has closed connection
(various errors can produce this message)
checking /glftpd/ftp-data/logs/error.log you might see something like
Tue Sep 23 12:40:20 2008 [7183Â Â Â ] Couldn’t canonicalize local hostname (1)
usually i would check the /etc/hosts but in this case, it was a typo i made in /etc/glftpd.conf
ifip 10.0.0.*
pasv_addr 10.0.0.2
elseip
pasv_addr some.fancy-dyndns.tld 1
endifip
the pasv_addr had a typo which made it impossible to do a lookup, and produced this error (thanks to glftpd for the fantastic precise detailed error message pointing me directly to glftpd.conf on line xxx)
and yes, im being sarcastic..