continuously disconnected

Help
orbisvicis
2008-01-29
2013-05-02
  • orbisvicis

    orbisvicis - 2008-01-29

    I connect to my proftpd server like this:
    curlftpfs password@place.domain.net:5200" target="_blank">ftp://username:password@place.domain.net:5200 -o ssl,no_verify_peer,no_verify_hostname ~/FTP

    curlftpfs -V
    curlftpfs 0.9.1 libcurl/7.16.4 fuse/2.5

    Ubuntu 7.10

    Once mounted, the filesystem is extremely slow, taking as much as 20 min. to refresh. I look at the proftpd tls logs and i see that curlftpfs & my server seem to be continuously handshaking. I look at the proftpd logs and see that as soon as i successfully authenticate and login, curlftpfs is disconnected.

    Here are the logs:
    root@veridian:/var/log/proftpd# cat tls.log 
    Jan 23 22:44:05 mod_tls/2.1.1[26710]: SSL/TLS-P requested, starting TLS handshake
    Jan 23 22:44:06 mod_tls/2.1.1[26710]: TLSv1/SSLv3 connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits)
    Jan 23 22:44:08 mod_tls/2.1.1[26710]: Protection set to Private
    Jan 23 22:44:09 mod_tls/2.1.1[26710]: starting TLS negotiation on data connection
    Jan 23 22:44:09 mod_tls/2.1.1[26710]: TLSv1/SSLv3 data connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits)
    Jan 23 22:44:09 mod_tls/2.1.1[26710]: starting TLS negotiation on data connection
    Jan 23 22:44:10 mod_tls/2.1.1[26710]: starting TLS negotiation on data connection
    Jan 23 22:44:20 mod_tls/2.1.1[26718]: SSL/TLS-P requested, starting TLS handshake
    Jan 23 22:44:20 mod_tls/2.1.1[26718]: TLSv1/SSLv3 connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits)
    Jan 23 22:44:24 mod_tls/2.1.1[26718]: Protection set to Private
    Jan 23 22:44:24 mod_tls/2.1.1[26718]: starting TLS negotiation on data connection
    Jan 23 22:44:24 mod_tls/2.1.1[26718]: TLSv1/SSLv3 data connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits)
    Jan 23 22:44:34 mod_tls/2.1.1[26725]: SSL/TLS-P requested, starting TLS handshake
    Jan 23 22:44:34 mod_tls/2.1.1[26725]: TLSv1/SSLv3 connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits)
    Jan 23 22:44:37 mod_tls/2.1.1[26725]: Protection set to Private
    Jan 23 22:44:37 mod_tls/2.1.1[26725]: starting TLS negotiation on data connection
    Jan 23 22:44:37 mod_tls/2.1.1[26725]: TLSv1/SSLv3 data connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits)
    Jan 23 22:44:47 mod_tls/2.1.1[26732]: SSL/TLS-P requested, starting TLS handshake
    Jan 23 22:44:47 mod_tls/2.1.1[26732]: TLSv1/SSLv3 connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits)
    Jan 23 22:44:50 mod_tls/2.1.1[26732]: Protection set to Private
    ...and so on

    root@veridian:/var/log/proftpd# cat proftpd.log 
    Jan 23 22:44:05 veridian proftpd[26710] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): FTP session opened.
    Jan 23 22:44:06 veridian proftpd[26710] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): mod_delay/0.5: delaying for 31 usecs
    Jan 23 22:44:08 veridian proftpd[26710] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): PAM(orbisvicis): Authentication failure.
    Jan 23 22:44:08 veridian proftpd[26710] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): USER orbisvicis: Login successful.
    Jan 23 22:44:08 veridian proftpd[26710] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): Preparing to chroot to directory '/home/ftp/users/orbisvicis'
    Jan 23 22:44:10 veridian proftpd[26710] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): FTP session closed.
    Jan 23 22:44:20 veridian proftpd[26718] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): FTP session opened.
    Jan 23 22:44:20 veridian proftpd[26718] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): mod_delay/0.5: delaying for 32 usecs
    Jan 23 22:44:22 veridian proftpd[26718] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): PAM(orbisvicis): Authentication failure.
    Jan 23 22:44:22 veridian proftpd[26718] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): USER orbisvicis: Login successful.
    Jan 23 22:44:22 veridian proftpd[26718] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): Preparing to chroot to directory '/home/ftp/users/orbisvicis'
    Jan 23 22:44:22 veridian proftpd[26718] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): mod_delay/0.5: delaying for 1225379 usecs
    Jan 23 22:44:24 veridian proftpd[26718] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): notice: user orbisvicis: aborting transfer: Link to file server lost.
    Jan 23 22:44:24 veridian proftpd[26718] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): FTP session closed.
    Jan 23 22:44:34 veridian proftpd[26725] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): FTP session opened.
    Jan 23 22:44:34 veridian proftpd[26725] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): mod_delay/0.5: delaying for 44 usecs
    Jan 23 22:44:36 veridian proftpd[26725] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): PAM(orbisvicis): Authentication failure.
    Jan 23 22:44:36 veridian proftpd[26725] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): USER orbisvicis: Login successful.
    Jan 23 22:44:36 veridian proftpd[26725] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): Preparing to chroot to directory '/home/ftp/users/orbisvicis'
    Jan 23 22:44:36 veridian proftpd[26725] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): mod_delay/0.5: delaying for 489127 usecs
    Jan 23 22:44:37 veridian proftpd[26725] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): notice: user orbisvicis: aborting transfer: Link to file server lost.
    Jan 23 22:44:37 veridian proftpd[26725] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): FTP session closed.
    Jan 23 22:44:47 veridian proftpd[26732] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): FTP session opened.
    Jan 23 22:44:48 veridian proftpd[26732] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): mod_delay/0.5: delaying for 51 usecs
    Jan 23 22:44:49 veridian proftpd[26732] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): PAM(orbisvicis): Authentication failure.
    Jan 23 22:44:49 veridian proftpd[26732] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): USER orbisvicis: Login successful.
    Jan 23 22:44:49 veridian proftpd[26732] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): Preparing to chroot to directory '/home/ftp/users/orbisvicis'
    ..and so on

    ################################################################
    However, my typical ftp client filezilla has no problems:
    ################################################################
    root@veridian:/var/log/proftpd# cat tls.log 
    Jan 23 22:40:51 mod_tls/2.1.1[26614]: TLS/TLS-C requested, starting TLS handshake
    Jan 23 22:40:52 mod_tls/2.1.1[26614]: TLSv1/SSLv3 connection accepted, using cipher AES128-SHA (128 bits)
    Jan 23 22:41:00 mod_tls/2.1.1[26614]: Protection set to Private
    Jan 23 22:41:00 mod_tls/2.1.1[26614]: starting TLS negotiation on data connection
    Jan 23 22:41:00 mod_tls/2.1.1[26614]: TLSv1/SSLv3 data connection accepted, using cipher AES128-SHA (128 bits)
    Jan 23 22:41:00 mod_tls/2.1.1[26614]: starting TLS negotiation on data connection
    Jan 23 22:41:24 mod_tls/2.1.1[26614]: starting TLS negotiation on data connection
    Jan 23 22:41:28 mod_tls/2.1.1[26614]: starting TLS negotiation on data connection
    .... so on till i disconnect

    root@veridian:/var/log/proftpd# cat proftpd.log 
    Jan 23 22:40:51 veridian proftpd[26614] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): FTP session opened.
    Jan 23 22:40:57 veridian proftpd[26614] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): mod_delay/0.5: delaying for 164 usecs
    Jan 23 22:40:58 veridian proftpd[26614] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): PAM(orbisvicis): Authentication failure.
    Jan 23 22:40:58 veridian proftpd[26614] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): USER orbisvicis: Login successful.
    Jan 23 22:40:58 veridian proftpd[26614] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): Preparing to chroot to directory '/home/ftp/users/orbisvicis'
    Jan 23 22:40:58 veridian proftpd[26614] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): mod_delay/0.5: delaying for 1165812 usecs
    Jan 23 22:43:09 veridian proftpd[26614] veridian.home (::ffff:128.180.238.228[::ffff:128.180.238.228]): FTP session closed.
    .. this is b/c i disconnected normally

    #################################################################
    curlftpfs connects normally, and does not throw any errors, even when -v -o ftpfs_debug -d

    So basically, is there any way i can fix the issue and make the connection permanent?

    In proftpd I use mod_delay, MasqueradeAddress (so that ftp clients wont freak out), sql virtual users, mod_tls with TLSProtocol SSLv23 and TLSVerifyClient off

     
    • Robson Braga Araujo

      This is a libcurl issue. The only version that works properly is 7.15.4.

       
    • orbisvicis

      orbisvicis - 2008-01-30

      ok, but i might upgrade curl (instead of downgrade), the bug page you submitted (@curl) is reported as fixed
      To what version ill install, i dunno yet

      Maybe if you could post all the incompatible versions on curlftpfs' home page ....

      thanks

       
      • Robson Braga Araujo

        You can compile version 7.15.4 and install it to a separate directory. Then, when running configure for curlftpfs, you can point your path to first look for the old version of the curl-config script.

        The easiest way would be to bundle 7.15.4 with curlftpfs. The newer versions don't add much for ftp and they break the possibility to cancel a download and stay connected.

         
    • orbisvicis

      orbisvicis - 2008-01-31

      assuming i've installed the older version of curl to /opt/curl-7.15.4

      How can configure curlftpfs to use this older version instead of the the system-wide curl?
      Is it something done at compilation?

       
      • Robson Braga Araujo

        PATH=/opt/curl-7.15.4/bin LD_LIBRARY_PATH=/opt/curl-7.15.4/lib ./configure
        make

        ./curlftpfs -V
        should print that you're using 7.15.4. If it doesn't, try:
        LD_LIBRARY_PATH=/opt/curl-7.15.4/lib ./curlftpfs -V

         
    • orbisvicis

      orbisvicis - 2008-01-31

      Doing:
      PATH=/opt/curl-7.15.4/bin
      before ./configure doesnt work, because the paths to important binaries such as chmod, rm, sed, expr etc
      are no longer found

      I have no idea how to change only the curl path, because the up-to-date curl is installed with all the important binaries at:
      /usr/bin/curl

      Is it possible to exclude one dir in $PATH?

       
    • orbisvicis

      orbisvicis - 2008-01-31

      nevermind, ##linux@freenode was very helpful
      $PATH does have a precedence left to right

      PATH=/opt/curl-7.15.4/bin:$PATH
      hash -r   # To clear the bash cache
      LD_LIBRARY_PATH=/opt/curl-7.15.4/lib
      ./configure
      make
      sudo make install
      exit

      new terminal:
      curl --version
      curl 7.16.4 (i486-pc-linux-gnu) libcurl/7.16.4 OpenSSL/0.9.8e zlib/1.2.3.3 libidn/1.0

      curlftpfs --version
      curlftpfs 0.9.1 libcurl/7.15.4 fuse/2.5

      pheeww
      it worked (hm i havent tested it yet hope fuse doesnt complain)

      thanks

       
      • Robson Braga Araujo

        Sorry to cause you trouble, I meant to type PATH=/opt/curl-7.15.4/bin:$PATH.

        Is it fast now?

         
    • orbisvicis

      orbisvicis - 2008-01-31

      ok tested and works perfectly

      the ftp server log has some unusual lines:
      Jan 31 02:23:14 server proftpd[12795] server.home : notice: user aborting transfer: Link to file server lost.

      But from the client side it works perfectly

      thanks

       
      • Robson Braga Araujo

        That's normal. The server expects the client to download the whole file. But programs often seek to various parts of the file, without reading it all sequentially. To support that, curlftpfs aborts the transfer and then asks for the file again with the correct offset. It may also cancel a transfer to be able to get a directory listing that you're doing in parallel and later resume the transfer.

        I'm glad that it worked. Thanks for the patience.

         
    • orbisvicis

      orbisvicis - 2008-01-31

      very fast ; )

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks