Author Topic: Performance of MC is good except FTP Connection - Solved  (Read 39485 times)

AriesTruong

  • Active Member
  • ***
  • Posts: 58
    • View Profile
Performance of MC is good except FTP Connection - Solved
« on: August 07, 2019, 09:38:37 »
Hi Mathias,

I m using MC 9 final on Win10 Pro x64.
With me, MC is fast but when I do connect to FTP then it take long time to scan folder and sometime it error as below.
With WinSCP and "FTP in totalcmd", they load structure folder is faster MC.

I don't like compare with others FTP but I only mention these FTP client here so that you can improve performance of loading structure folder in FTP when you have free time.

=======================================
019-08-07 14:24:53 < 200 Always in UTF8 mode.
2019-08-07 14:24:53 > TYPE A
2019-08-07 14:24:53 < 200 Switching to ASCII mode.
2019-08-07 14:24:53 > MODE S
2019-08-07 14:24:53 < 200 Mode set to S.
2019-08-07 14:24:53 > STRU F
2019-08-07 14:24:53 < 200 Structure set to F.
2019-08-07 14:24:53 > PROT P
2019-08-07 14:24:54 < 200 PROT now Private.
2019-08-07 14:24:54 > CWD /
2019-08-07 14:24:54 < 250 Directory successfully changed.
2019-08-07 14:24:54 > PASV
2019-08-07 14:24:54 < 227 Entering Passive Mode (151,127,122,201,218,156).
2019-08-07 14:24:54 > LIST
2019-08-07 14:24:54 = Opening data connection to IP 151.127.122.201 on port 55964
2019-08-07 14:24:55 < 150 Here comes the directory listing.
2019-08-07 14:25:25 = Error reading secure data from the server. (Socket error) (Error : 10060) A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
2019-08-07 14:25:56 < 226 Directory send OK.
« Last Edit: August 26, 2019, 05:50:09 by AriesTruong »
Life changes when we change

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: Performance of MC is good except FTP Connection
« Reply #1 on: August 07, 2019, 09:51:46 »
You connection using secure SSL/TLS  channel ,  it the server a Windows or Linux ? Do you know what FTP Server software it is running ?

AriesTruong

  • Active Member
  • ***
  • Posts: 58
    • View Profile
Re: Performance of MC is good except FTP Connection
« Reply #2 on: August 08, 2019, 15:34:22 »
Hi Mathias,

I don't know which OS or FTP Server. But I get log from totalcmd after login successful:

===========================Log from another ftp client================
----------
Using sChannel (Secur32.dll) for SSL/TLS connection.
Connect to: (08/08/2019 20:28:59)
hostname=151.127.122.201
username=test
startdir=data/Download
151.127.122.201=151.127.122.201
220 (vsFTPd 2.3.5)
AUTH TLS
234 Proceed with negotiation.
Using client certificate...
Method: TLSv1
Cert subject: hidden by me
Cert issuer: hidden by me
USER test
331 Please specify the password.
PASS ***********
230 Login successful.
SYST
215 UNIX Type: L8
FEAT
211-Features:
 AUTH TLS
 EPRT
 EPSV
 MDTM
 PASV
 PBSZ
 PROT
 REST STREAM
 SIZE
 TVFS
 UTF8
211 End
HELP SITE
214-The following commands are recognized.
 ABOR ACCT ALLO APPE CDUP CWD  DELE EPRT EPSV FEAT HELP LIST MDTM MKD
 MODE NLST NOOP OPTS PASS PASV PORT PWD  QUIT REIN REST RETR RMD  RNFR
 RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD
 XPWD XRMD
214 Help OK.
PBSZ 0
200 PBSZ set to 0.
PROT P
200 PROT now Private.
OPTS UTF8 ON
200 Always in UTF8 mode.
CWD data/Download
550 Failed to change directory.
Connect ok!
PWD
257 "/USR/USR/test"
Get directory
TYPE A
200 Switching to ASCII mode.
PASV
227 Entering Passive Mode (151,127,122,201,60,145).
Connected to PASV port
LIST
150 Here comes the directory listing.
Download: 2,048 bytes
Waiting for server...
226 Directory send OK.
Life changes when we change

AriesTruong

  • Active Member
  • ***
  • Posts: 58
    • View Profile
Re: Performance of MC is good except FTP Connection
« Reply #3 on: August 20, 2019, 04:03:56 »
Hi Mathias,

Thank for new Beta Update (v9.1 build 2544). Currently it works better previous but performance is not good when load folder. I attached log of ftp. Please take time to improve.

One issue from FTP. When system scanning folder then I press ESC to abort as guide from list then MC is not responding about 2 minutes to back normal, if in this time I click on MC then it is hang and must kill form Task Manager.

Thanks
Life changes when we change

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: Performance of MC is good except FTP Connection
« Reply #4 on: August 20, 2019, 14:08:20 »
it because it fails to connect, why I don't know. properly they are using incompatible SSL/TLS connection ways.
MC are using build in function in windows for it.

Yes aborting it not possible in the same way as local drive.. since MC needs to wait for the server to response. and if it does not accept the abort command. Then MC must wait.

I have no idea what server you connect to.. But all the one try on works.

Might be that the Cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA that you server is using it not enabled in windows. google on it and there are issues with that cipher so windows might have them in there disbaled list. You might need to enable it manually
« Last Edit: August 20, 2019, 14:18:43 by Mathias (Author) »

AriesTruong

  • Active Member
  • ***
  • Posts: 58
    • View Profile
Re: Performance of MC is good except FTP Connection
« Reply #5 on: August 20, 2019, 16:36:05 »
I will search google but I consider why I can load folder is fast with totalcmd!
Life changes when we change

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: Performance of MC is good except FTP Connection
« Reply #6 on: August 20, 2019, 17:10:36 »
I think they are using OpenSSL.. MC is using Window Secure Layer for SSL/TLS
I don't know why it hangs there and waits for a timeout, It is weird.

It works with most other FTP servers.. so it is sometimes with the combination of that ftp server software used

AriesTruong

  • Active Member
  • ***
  • Posts: 58
    • View Profile
Re: Performance of MC is good except FTP Connection
« Reply #7 on: August 21, 2019, 00:53:16 »
Yes I agree. It use openssl.
Life changes when we change

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: Performance of MC is good except FTP Connection
« Reply #8 on: August 21, 2019, 13:50:38 »
The FTP sever software is vsftpd (as it say first in the log you sent), I have recreated the issue with it.
It is not because of OpenSSL. I tried some other using openSSL.. it is the way vsftpd have implemented there secure data connection way. They close the connection in a strange way when they have sent data. In a way that other FTP server software do not.
So it is not a quick and easy fix. There is a risk that it will break how other server works. So not sure If I have time to fix this now. It is a really complex issue to workaround.

AriesTruong

  • Active Member
  • ***
  • Posts: 58
    • View Profile
Re: Performance of MC is good except FTP Connection
« Reply #9 on: August 21, 2019, 16:52:06 »
Thank you for explaining.
When you have free time you can stop by this case.

Now I hope you can take a look for some bugs and enhancement I fill  :)
Life changes when we change

AriesTruong

  • Active Member
  • ***
  • Posts: 58
    • View Profile
Re: Performance of MC is good except FTP Connection - Solved
« Reply #10 on: August 26, 2019, 05:49:34 »
With latest beta build (9.1 b2548)
As my observation: MC takes about 2 seconds to load content of selected folder. Performance is good.

Thanks Mathias.
Life changes when we change