Welcome to Centmin Mod Community
Register Now

Pure-FTPD FTP Connection timeout / Uploads getting aborted

Discussion in 'Other Centmin Mod Installed software' started by deschlong, Oct 15, 2020.

  1. deschlong

    deschlong New Member

    26
    5
    3
    Mar 1, 2018
    Ratings:
    +8
    Local Time:
    11:37 AM
    1.15
    10.1
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.19.2
    • PHP Version Installed: 7.3.13
    • MariaDB MySQL Version Installed: 10.3.24
    • When was last time updated Centmin Mod code base ? : Just did it
    • Persistent Config:
      Code (Text):
      NGINX_SSLCACHE_ALLOWOVERRIDE='y'
      AUTOHARDTUNE_NGINXBACKLOG='y'
      ZSTD_LOGROTATE_NGINX='y'
      ZSTD_LOGROTATE_PHPFPM='y'
      NGINX_LIBBROTLI='y'
      NGXDYNAMIC_BROTLI='y'
      PHP_PGO='y'
      PHP_BROTLI='y'
      PHP_LZFOUR='y'
      PHP_LZF='y'
      PHP_ZSTD='y'
      NGINX_PAGESPEED='y'
      NGXDYNAMIC_NGXPAGESPEED='y'
      NGINX_IOURING_PATCH='y'
      
      MARCH_TARGETNATIVE='n'
      LETSENCRYPT_DETECT='y'
      DUALCERTS='y'
      
      
    Hello,

    one of my customers is getting FTP issues which I can confirm lately. I'm not sure when it all started, but I also tried to upload files (folders, single files, zip archives, etc.) and everytime I'm getting a abort.

    From filezilla I'm getting this:


    Code (Text):
    Status:    Starting upload of MYARCHIVE.zip
    Status:    Retrieving directory listing of "/private"...
    Command:    TYPE I
    Response:    200 TYPE is now 8-bit binary
    Command:    PASV
    Response:    227 Entering Passive Mode (67,205,153,140,144,241)
    Command:    MLSD
    Response:    150 Accepted data connection
    Response:    226-Options: -a -l
    Response:    226 4 matches total
    Command:    PASV
    Response:    227 Entering Passive Mode (67,205,153,140,171,161)
    Command:    REST 37404672
    Response:    350 Restarting at 37404672
    Command:    STOR MYARCHIVE.zip
    Response:    150 Accepted data connection
    Error:    File transfer aborted by user after transferring 74.474.333 bytes in 5 seconds
    Status:    Disconnected from server
    Error:    GnuTLS error -110 in gnutls_record_recv: The TLS connection was non-properly terminated.
    Status:    Server did not properly shut down TLS connection
    Error:    Could not read from socket: ECONNABORTED - Connection aborted
    Error:    Disconnected from server
    
    


    I have checked if the IPs are blocked with
    Code (Text):
    csf -g IP
    


    But none of the IPs are blocked from the people who try top upload. Right now I'm stuck and out of ideas on what to do :/

    Thanks for your help!
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,600
    12,225
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,794
    Local Time:
    8:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  3. deschlong

    deschlong New Member

    26
    5
    3
    Mar 1, 2018
    Ratings:
    +8
    Local Time:
    11:37 AM
    1.15
    10.1
    I personally have tried it with Windows10 (Latest build, 2004 - 19041.546), tried with Filezilla and WinSCP.

    Customer tried it with latest MacOS with Filezilla and Cyberduck.

    Every tool is up2date.

    I dont see any port flooding.

    Concurrent is set to 1 max.

    I have also changed the auto-generated password since it contained special characters, but still no luck.

    EDIT: What I also noticed, when I upload a 100mb file the progress bar is going instant to 99%, then stops for around 3-4 seconds and then the error pops up.

    On WinSCP I get this error:

    Code (Text):
    Timeout detected. (control connection)
    Copying files to remote side failed.
    


    EDIT 2:

    The upload somewhat works, but its uploading it in phases (?), its aborting the connection, reconnecting, then uploads again. The full log of the upload:

    Code (Text):
    Status:    Starting upload of MYARCHIVE.zip
    Command:    PASV
    Response:    227 Entering Passive Mode (67,205,153,140,120,115)
    Command:    STOR MYARCHIVE.zip
    Response:    150 Accepted data connection
    Error:    Connection timed out after 20 seconds of inactivity
    Error:    File transfer failed after transferring 111.879.005 bytes in 20 seconds
    Status:    Connecting to SERVERIP:21...
    Status:    Connection established, waiting for welcome message...
    Status:    Initializing TLS...
    Status:    Verifying certificate...
    Status:    TLS connection established.
    Status:    Logged in
    Status:    Starting upload of MYARCHIVE.zip
    Status:    Retrieving directory listing of "/private"...
    Command:    TYPE I
    Response:    200 TYPE is now 8-bit binary
    Command:    PASV
    Response:    227 Entering Passive Mode (67,205,153,140,145,215)
    Command:    MLSD
    Response:    150 Accepted data connection
    Response:    226-Options: -a -l 
    Response:    226 4 matches total
    Command:    PASV
    Response:    227 Entering Passive Mode (67,205,153,140,144,119)
    Command:    REST 52068352
    Response:    350 Restarting at 52068352
    Command:    STOR MYARCHIVE.zip
    Response:    150 Accepted data connection
    Error:    Connection timed out after 20 seconds of inactivity
    Error:    File transfer failed after transferring 59.810.653 bytes in 20 seconds
    Status:    Connecting to SERVERIP:21...
    Status:    Connection established, waiting for welcome message...
    Status:    Initializing TLS...
    Status:    Verifying certificate...
    Status:    TLS connection established.
    Status:    Logged in
    Status:    Starting upload of MYARCHIVE.zip
    Status:    Retrieving directory listing of "/private"...
    Status:    File transfer successful, transferred 28.517.213 bytes in 15 seconds
    Status:    Retrieving directory listing of "/private"...
    Status:    Directory listing of "/private" successful
    
     
    Last edited: Oct 15, 2020
  4. eva2000

    eva2000 Administrator Staff Member

    54,600
    12,225
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,794
    Local Time:
    8:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Are you connection via server IP or hostname/domain ? Is domain behind Cloudflare ?

    Cloudflare has POST HTTP upload size limits Understanding Cloudflare's CDN

    Cloudflare limits upload size (HTTP POST request size) per plan type:
    Though not sure if it applies for FTP TLS. Tried using server IP instead of domain name to connect for FTP server ?
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,600
    12,225
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,794
    Local Time:
    8:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    could be client side FTP or router issues see https://superuser.com/a/1329874/101822

    also try enabling send FTP server keep alive to keep server active and not idle
     
    Last edited: Oct 22, 2020
  6. deschlong

    deschlong New Member

    26
    5
    3
    Mar 1, 2018
    Ratings:
    +8
    Local Time:
    11:37 AM
    1.15
    10.1
    Cloudflare would make sense, because on a staging site of the same website theres no cloudflare and FTP works, disabled CF on the main site now aswell and will see how it goes.
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,600
    12,225
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,794
    Local Time:
    8:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    If that is the case, just tell folks to connect to server's IP address instead of hostname for FTP over TLS. But then that exposes real server IP if you want to hide that.