PDA

View Full Version : QFtp->List() does not recieve any data



nopalot
13th May 2006, 15:11
Hi Folks,

i am using QFtp to download data. All is working well if i connect to trolltech or any other ftp server.
Now i found a ftp server from which QFtp->list() does not receive any data although there are plenty of files and directorys on the server. The only hint what may went wrong is given by the command line client 'lftp' which prints the following messages after a 'ls' command:

500 'EPSV': command not understood
227 Entering Passive Mode (216,19,206,207,40,24)
125 Data connection already open; Transfer starting.
Files on the server follow...

After googling a little i've found the following at http://www.landfield.com/wu-ftpd/mail-archive/wuftpd-questions/2000/Dec/0120.html


> 500 'EPSV': command not understood.
> 227 Entering Passive Mode (194,128,199,13,188,159)
> does any one have any idea as to what is not quite right ?

The client. EPSV is for IPv6 and the daemon does not support IPv6. The
client appears to be trying an IPv6 command on and IPv4 socket. Dumb.
When you submit this bug to the author, please ask him to have someone give
a good, solid Boot To The Head; obviously it is wasn't quite working when
he put in the IPv6 support and needs a kick-start.

The above message indicates that there's a problem at qftp.

An other thing i've noticed is that konqueror (kde 3.5.2) seems to have the same problem. (No data is displayed although there are a lot of files at the server). I'm using QT4.1.2 with suse linux x64 10.0 by the way.
Now i'm uncertain what to do next...

Please let me know if you have any informations or ideas how to fix the problem.
Thanks in advance,
nop nop nop

jacek
13th May 2006, 16:10
The only hint what may went wrong is given by the command line client 'lftp' which prints the following messages after a 'ls' command:
...
The above message indicates that there's a problem at qftp.
I don't understand --- QFtp is wrong, because lftp prints an error message?
Check with some sniffer (like Ethereal (http://www.ethereal.com/)) what's really happening.

nopalot
14th May 2006, 18:17
Hi again.

Jacek, thanks for the hint.
After playing a little with ethereal i've seen that the remote sever replies its directory content in response of a list command but QFtp->listInfo() is not emitted.
Do you have any ideas what could prevent QFtp->listInfo() from beeing emitted?
The problem is 100% reproduceable, but only at one server i've found. Unfortunatly my app depends on the data from this server...
So any ideas how to fix the problem are highly appreciated.
Thanks for your support,
nop nop nop

jacek
14th May 2006, 18:44
Do you have any ideas what could prevent QFtp->listInfo() from beeing emitted?
The problem is 100% reproduceable, but only at one server i've found. Unfortunatly my app depends on the data from this server...
AFAIR there was a problem when directory listing contained wrong number of columns. Get a listing for some directory using lftp for both working and non-working FTP server and check if they contain the same columns.

nopalot
17th May 2006, 21:36
Hi Jacek,

thank you verry much for this information.
There is a clear difference between the errornous and all working ftp servers.
Here are two entries from the 'problem child' ftp server:

03-27-06 07:41PM <DIR> Software
03-27-06 07:27PM 5105 terms.txt

And this is how the data returned from a working ftp server looks like:

-rw-r--r-- 1 ftp ftp 119 Jun 30 2003 mirrors
drwxrwxr-x 2 ftp ftp 4096 Jun 16 2005 misc

Do you know a way how to fix or work around the problem?
Thanks again,
nop nop nop

jacek
17th May 2006, 21:42
Do you know a way how to fix or work around the problem?
The question is whether that server is RFC-compliant or not. If it is, then it's a Qt bug. If not, you need some workaround, but since QFtp doesn't have virtual methods you probably will have to create another class using its sources.