All,
I have an issue with a remote ftp server that has kept me busy for three days now and I am going nuts over it. :(
A while ago, I wrote a simple ftp retriever class that uses apache commons-net 2.0. The class works fine on 5 different ftp servers, I can retrieve data as I want. Now I have come across a server that I need to connect to that just won't let me list directories or retrieve data.
This is the order of commands that are being sent and retrieved by my class:
220 (vsFTPd 2.0.1)
USER XXXXXXX
331 Please specify the password.
PASS XXXXXXX
230 Login successful
TYPE I
200 Switching to Binary mode.
PASV
227 Entering Passive Mode (XXX,XXX,XXX,XXX,XXX,XXX)
NLST
150 Here comes the directory listing.
226 Directory send OK.
SYST
215 UNIX Type: L8
PASV
227 Entering Passive Mode (XXX,XXX,XXX,XXX,XXX,XXX)
LIST
150 Here comes the directory listing.
At the last line, my code hangs indefinitely (well, I killed it after 2 hours of waiting to see how long it would block). I have tried everything, from using an active connection to setting ASCII type to using different ftp libraries - always with the same result.
Normally, I would just call the guys and tell them that their server is configured incorrectly. However, connecting via FileZilla not only works but is lightning fast and never causes any problems. Also, connecting via command line on linux works like a charm.
I am totally lost here. Does anybody have any ideas why I have this problem?
Cheers