Results 1 to 6 of 6

Thread: QFtp->List() does not recieve any data

  1. #1
    Join Date
    Mar 2006
    Posts
    5
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QFtp->List() does not recieve any data

    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/mai.../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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFtp->List() does not recieve any data

    Quote Originally Posted by nopalot
    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) what's really happening.

  3. #3
    Join Date
    Mar 2006
    Posts
    5
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFtp->List() does not recieve any data

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFtp->List() does not recieve any data

    Quote Originally Posted by nopalot
    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.

  5. #5
    Join Date
    Mar 2006
    Posts
    5
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFtp->List() does not recieve any data

    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:
    Qt Code:
    1. 03-27-06 07:41PM <DIR> Software
    2. 03-27-06 07:27PM 5105 terms.txt
    To copy to clipboard, switch view to plain text mode 
    And this is how the data returned from a working ftp server looks like:
    Qt Code:
    1. -rw-r--r-- 1 ftp ftp 119 Jun 30 2003 mirrors
    2. drwxrwxr-x 2 ftp ftp 4096 Jun 16 2005 misc
    To copy to clipboard, switch view to plain text mode 

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

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFtp->List() does not recieve any data

    Quote Originally Posted by nopalot
    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.

Similar Threads

  1. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.