I have been obtaining errors like below because I did not specify enough ports for the active FTP connections.
Response: 150 Opening data channel for directory list.
Response: 425 Can't open data connection.Error: Failed to retrieve directory listing
Things seem to work nicely with limited ports, but when I perform actions that cause very rapid short-lived connections, something like 20-30% of the connections drop with the error above.
I started with ports 50000-50100.
When I opened up to 50000-52000, the errors disappeared.
Why did this fix my problem? I would like to understand why adding ports fixed it.
I have a suspicion that ports become "locked down" for a few moments surrounding when they are used in a connection. If connections are happening so rapidly, there may be no ports available, thus the above error.
Can anybody confirm?
When you use this mode you should have ports opened in both directions (from server and from client ) the port 21 is only used for the initial handshake between server and client . For transferring files / information you need to open several ports (that's why you can't list with dir ) . On active mode it tries to use 20 , then 21 as it can be seen here (http://wiki.filezilla-project.org/FAQ) . I had the same issues but with passive FTP , and because the ports are randomized (depending on your configuration ) , I would recommand you to open the firewall(temporally for all ports ) , then type netstat -ap this will show you what ports it is used by your filezilla server .
After that close the firewall , and open the necessary ports .