Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maui NetCore 7.0 on Mac: UploadFile is slow to upload images #1312

Closed
LHB-2023 opened this issue Aug 1, 2023 · 8 comments
Closed

Maui NetCore 7.0 on Mac: UploadFile is slow to upload images #1312

LHB-2023 opened this issue Aug 1, 2023 · 8 comments

Comments

@LHB-2023
Copy link

LHB-2023 commented Aug 1, 2023

In the Maui project created on the NetCore 7.0 platform, when running on the Mac system, UploadFile is slow to upload images and can successfully upload them, but returns a failure without throwing an exception. Windows runs normally

@robinrodricks
Copy link
Owner

Attach all logs and see the Wiki on how to do that. We cannot debug without Full FTP logs.

@robinrodricks robinrodricks changed the title In the Maui project created on the NetCore 7.0 platform, when running on the Mac system, UploadFile is slow to upload images and can successfully upload them, but returns a failure without throwing an exception. Windows runs normally Maui NetCore 7.0 platform, Mac, UploadFile is slow to upload images Aug 1, 2023
@robinrodricks robinrodricks changed the title Maui NetCore 7.0 platform, Mac, UploadFile is slow to upload images Maui NetCore 7.0 on Mac: UploadFile is slow to upload images Aug 1, 2023
@LHB-2023
Copy link
Author

LHB-2023 commented Aug 3, 2023

(000076)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> Connected on port 8001, sending welcome message...
(000076)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> 220-FileZilla Server 0.9.60 beta
(000076)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000076)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> 220 Please visit https://filezilla-project.org/
(000076)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> AUTH TLS
(000076)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> 234 Using authentication type TLS
(000076)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> TLS connection established
(000076)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> disconnected.
(000077)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> Connected on port 8001, sending welcome message...
(000077)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> 220-FileZilla Server 0.9.60 beta
(000077)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000077)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> 220 Please visit https://filezilla-project.org/
(000077)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> USER admin
(000077)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> 331 Password required for admin
(000077)2023/8/3 15:35:03 - (not logged in) (172.29.2.162)> PASS ********
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)> 230 Logged on
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)> FEAT
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)> 211-Features:
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  MDTM
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  REST STREAM
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  SIZE
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  MLST type*;size*;modify*;
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  MLSD
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  AUTH SSL
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  AUTH TLS
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  PROT
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  PBSZ
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  UTF8
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  CLNT
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  MFMT
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  EPSV
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)>  EPRT
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)> 211 End
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)> OPTS UTF8 ON
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)> 202 UTF8 mode is always enabled. No need to send this command.
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)> SYST
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)> 215 UNIX emulated by FileZilla
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)> PWD
(000077)2023/8/3 15:35:03 - admin (172.29.2.162)> 257 "/" is current directory.
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> SIZE /0126_222.jpg
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> 213 468445
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> DELE 0126_222.jpg
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> 250 File deleted successfully
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> TYPE I
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> 200 Type set to I
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> PASV
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> 227 Entering Passive Mode (172,29,2,111,88,214)
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> STOR 0126_222.jpg
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> 150 Opening data channel for file upload to server of "/0126_222.jpg"
(000075)2023/8/3 15:36:13 - admin (172.29.2.162)> 421 Connection timed out.
(000075)2023/8/3 15:36:13 - admin (172.29.2.162)> disconnected.
(000077)2023/8/3 15:36:36 - admin (172.29.2.162)> 226 Successfully transferred "/0126_222.jpg"
(000077)2023/8/3 15:38:36 - admin (172.29.2.162)> 421 Connection timed out.
(000077)2023/8/3 15:38:36 - admin (172.29.2.162)> disconnected.

@FanDjango
Copy link
Collaborator

It would be better if the log were made with "verbose" detail. Can you redo it?

(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> 150 Opening data channel for file upload to server of "/0126_222.jpg"
(000075)2023/8/3 15:36:13 - admin (172.29.2.162)> 421 Connection timed out.

You are connecting to a 0.9.60 beta filezilla server.

There are numerous issues concerning this sever version.

Search for these in our closed issues.

@LHB-2023
Copy link
Author

LHB-2023 commented Aug 7, 2023

It's not a problem with the server. It's okay for me to run the program on Windows. I switched to an FTP server built on IIS, and running it on Mac also has the same problem

@FanDjango
Copy link
Collaborator

I wrote,

It would be better if the log were made with "verbose" detail. Can you redo it?

All I can see is this:

(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> STOR 0126_222.jpg
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> 150 Opening data channel for file upload to server of "/0126_222.jpg"
(000075)2023/8/3 15:36:13 - admin (172.29.2.162)> 421 Connection timed out.
(000075)2023/8/3 15:36:13 - admin (172.29.2.162)> disconnected.
(000077)2023/8/3 15:36:36 - admin (172.29.2.162)> 226 Successfully transferred "/0126_222.jpg"

Verbose, I can see more, maybe.

@robinrodricks wrote,

Attach all logs and see the Wiki on how to do that. We cannot debug without Full FTP logs.

Duh.

It's not a problem with the server. It's okay for me to run the program on Windows. I switched to an FTP server built on IIS, and running it on Mac also has the same problem

What program? Show the code? Have you got a wireshark trace?

What version of FluentFTP?

All of this I could see in a verbose log or you could be polite enough to give enough information in the original post of the issue.

UploadFile is slow to upload images and can successfully upload them, but returns a failure without throwing an exception

To a degree, I agree with that. 421 Connection timed out is not giving an exception? In a verbose log, I could see more about the code paths taken.

But since you don't seem to want to give enough information, I should perhaps remove myself from trying to help on this issue.

@LHB-2023
Copy link
Author

LHB-2023 commented Aug 14, 2023

Thread started: <Thread Pool> #23
2023-08-13 21:45:58.395 Maui[1535:27316] >         AutoConnect()
2023-08-13 21:45:58.396 Maui[1535:27316] >         AutoDetect(CloneConnection = False, FirstOnly = True, IncludeImplicit = True, RequireEncryption = False, ProtocolPriority = [Tls11, Tls12])
2023-08-13 21:45:58.396 Maui[1535:27316] Auto-Detect trying encryption mode "Auto" with "Tls11, Tls12"
2023-08-13 21:45:58.396 Maui[1535:27316] >         Connect(False)
2023-08-13 21:45:58.396 Maui[1535:27316] FluentFTP 47.1.0.0(.NET 6.0)
2023-08-13 21:45:58.397 Maui[1535:27316] Connecting to IP #1= ***:8001
2023-08-13 21:45:58.399 Maui[1535:27316] Waiting for a response
2023-08-13 21:45:58.410 Maui[1535:27316] Response: 220-FileZilla Server 0.9.60 beta
Response: 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
2023-08-13 21:45:58.410 Maui[1535:27316] Response: 220 Please visit https://filezilla-project.org/ [738745.199d]
2023-08-13 21:45:58.410 Maui[1535:27316] Status:   Detected FTP server: FileZilla
2023-08-13 21:45:58.411 Maui[1535:27316] Command:  AUTH TLS
2023-08-13 21:45:58.411 Maui[1535:27316] Waiting for response to: AUTH TLS
2023-08-13 21:45:58.414 Maui[1535:27316] Response: 234 Using authentication type TLS [3ms]
2023-08-13 21:45:58.414 Maui[1535:27316] SSL Buffering disabled because of .NET 5.0 and later
2023-08-13 21:45:58.429 Maui[1535:27316] FTPS authentication successful, lib = .NET SslStream, cipher suite = Tls12 (Aes256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, DiffieHellman, 0) [14ms]
2023-08-13 21:45:58.430 Maui[1535:27316] Command:  USER ***
2023-08-13 21:45:58.430 Maui[1535:27316] Waiting for response to: USER ***
2023-08-13 21:45:58.432 Maui[1535:27316] Response: 331 Password required for *** [1ms]
2023-08-13 21:45:58.432 Maui[1535:27316] Command:  PASS ***
2023-08-13 21:45:58.432 Maui[1535:27316] Waiting for response to: PASS ***
2023-08-13 21:45:58.434 Maui[1535:27316] Response: 230 Logged on [1ms]
2023-08-13 21:45:58.434 Maui[1535:27316] Command:  PBSZ 0
2023-08-13 21:45:58.434 Maui[1535:27316] Waiting for response to: PBSZ 0
2023-08-13 21:45:58.435 Maui[1535:27316] Response: 200 PBSZ=0 [1ms]
2023-08-13 21:45:58.435 Maui[1535:27316] Command:  PROT P
2023-08-13 21:45:58.435 Maui[1535:27316] Waiting for response to: PROT P
2023-08-13 21:45:58.437 Maui[1535:27316] Response: 200 Protection level set to P [1ms]
2023-08-13 21:45:58.437 Maui[1535:27316] Command:  FEAT
2023-08-13 21:45:58.437 Maui[1535:27316] Waiting for response to: FEAT
2023-08-13 21:45:58.442 Maui[1535:27316] Response: 211-Features:
Response: MDTM
Response: REST STREAM
Response: SIZE
Response: MLST type*;size*;modify*;
Response: MLSD
Response: AUTH SSL
Response: AUTH TLS
Response: PROT
Response: PBSZ
Response: UTF8
Response: CLNT
Response: MFMT
Response: EPSV
2023-08-13 21:45:58.442 Maui[1535:27316] Response: EPRT
2023-08-13 21:45:58.442 Maui[1535:27316] Response: 211 End [4ms]
2023-08-13 21:45:58.443 Maui[1535:27316] Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
2023-08-13 21:45:58.443 Maui[1535:27316] Command:  OPTS UTF8 ON
2023-08-13 21:45:58.443 Maui[1535:27316] Waiting for response to: OPTS UTF8 ON
2023-08-13 21:45:58.446 Maui[1535:27316] Response: 202 UTF8 mode is always enabled. No need to send this command. [2ms]
2023-08-13 21:45:58.446 Maui[1535:27316] Command:  SYST
2023-08-13 21:45:58.446 Maui[1535:27316] Waiting for response to: SYST
2023-08-13 21:45:58.449 Maui[1535:27316] Response: 215 UNIX emulated by FileZilla [2ms]
2023-08-13 21:45:58.450 Maui[1535:27316] Listing parser set to: Machine
2023-08-13 21:45:58.450 Maui[1535:27316] Command:  PWD
2023-08-13 21:45:58.450 Maui[1535:27316] Waiting for response to: PWD
2023-08-13 21:45:58.452 Maui[1535:27316] Response: 257 "/" is current directory. [1ms]
2023-08-13 21:45:59.300 Maui[1535:27316] >         UploadFile("/Users/admin/Projects/Maui/Maui/bin/Debug/Tmp/0000000001/0126.jpg", "0126_222.jpg", Overwrite, False, None)
2023-08-13 21:45:59.301 Maui[1535:27316] >         FileExists("0126_222.jpg")
2023-08-13 21:45:59.302 Maui[1535:27316] Command:  SIZE /0126_222.jpg
2023-08-13 21:45:59.303 Maui[1535:27316] Waiting for response to: SIZE /0126_222.jpg
2023-08-13 21:45:59.306 Maui[1535:27316] Response: 550 File not found [3ms]
2023-08-13 21:45:59.306 Maui[1535:27316] >         OpenWrite("0126_222.jpg", Binary)
2023-08-13 21:45:59.307 Maui[1535:27316] Command:  TYPE I
2023-08-13 21:45:59.307 Maui[1535:27316] Waiting for response to: TYPE I
2023-08-13 21:45:59.310 Maui[1535:27316] Response: 200 Type set to I [2ms]
2023-08-13 21:45:59.310 Maui[1535:27316] >         OpenDataStream("STOR 0126_222.jpg", 0)
2023-08-13 21:45:59.310 Maui[1535:27316] >         OpenPassiveDataStream(PASV, "STOR 0126_222.jpg", 0)
2023-08-13 21:45:59.310 Maui[1535:27316] Command:  PASV
2023-08-13 21:45:59.311 Maui[1535:27316] Waiting for response to: PASV
2023-08-13 21:45:59.314 Maui[1535:27316] Response: 227 Entering Passive Mode (172,29,2,111,239,34) [3ms]
2023-08-13 21:45:59.315 Maui[1535:27316] PASV advertised a non-routable IPAD. Using original connect dnsname/IPAD
2023-08-13 21:45:59.315 Maui[1535:27316] Connecting to IP #1= ***:61218
2023-08-13 21:45:59.317 Maui[1535:27316] Command:  STOR 0126_222.jpg
2023-08-13 21:45:59.317 Maui[1535:27316] Waiting for response to: STOR 0126_222.jpg
Thread started: <Thread Pool> #24
2023-08-13 21:45:59.365 Maui[1535:27316] Response: 150 Opening data channel for file upload to server of "/0126_222.jpg" [48ms]
2023-08-13 21:45:59.366 Maui[1535:27316] SSL Buffering disabled because of .NET 5.0 and later
2023-08-13 21:45:59.386 Maui[1535:27316] FTPS authentication successful, lib = .NET SslStream, cipher suite = Tls12 (Aes256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, DiffieHellman, 0) [19ms]
Thread finished: <Thread Pool> #21
Thread finished: <Thread Pool> #22
Thread started: <Thread Pool> #25
2023-08-13 21:46:54.692 Maui[1535:27316] Uploaded 468445 bytes
2023-08-13 21:46:54.693 Maui[1535:27316] Closing/Disposing FtpSocketStream(data connection)
2023-08-13 21:46:54.695 Maui[1535:27316] Waiting for response to: *UPLOAD*
Thread finished: <Thread Pool> #24
2023-08-13 21:47:09.740 Maui[1535:27316] Closing/Disposing FtpSocketStream(data connection)
2023-08-13 21:47:09.740 Maui[1535:27316] IOException for file /Users/admin/Projects/Maui/Maui/bin/Debug/Tmp/0000000001/0126.jpg
2023-08-13 21:47:09.750 Maui[1535:27316] Failed to upload file.

@FanDjango
Copy link
Collaborator

First one:

(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> STOR 0126_222.jpg
(000077)2023/8/3 15:35:05 - admin (172.29.2.162)> 150 Opening data channel for file upload to server of "/0126_222.jpg"
(000075)2023/8/3 15:36:13 - admin (172.29.2.162)> 421 Connection timed out.
(000075)2023/8/3 15:36:13 - admin (172.29.2.162)> disconnected.
(000077)2023/8/3 15:36:36 - admin (172.29.2.162)> 226 Successfully transferred "/0126_222.jpg"

Second one:

2023-08-13 21:45:59.317 Maui[1535:27316] Command:  STOR 0126_222.jpg
2023-08-13 21:45:59.317 Maui[1535:27316] Waiting for response to: STOR 0126_222.jpg
2023-08-13 21:45:59.365 Maui[1535:27316] Response: 150 Opening data channel for file upload to server of "/0126_222.jpg" [48ms]
2023-08-13 21:45:59.366 Maui[1535:27316] SSL Buffering disabled because of .NET 5.0 and later
2023-08-13 21:45:59.386 Maui[1535:27316] FTPS authentication successful, lib = .NET SslStream, cipher suite = Tls12 (Aes256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, DiffieHellman, 0) [19ms]
2023-08-13 21:46:54.692 Maui[1535:27316] Uploaded 468445 bytes
2023-08-13 21:46:54.693 Maui[1535:27316] Closing/Disposing FtpSocketStream(data connection)
2023-08-13 21:46:54.695 Maui[1535:27316] Waiting for response to: *UPLOAD*
2023-08-13 21:47:09.740 Maui[1535:27316] Closing/Disposing FtpSocketStream(data connection)
2023-08-13 21:47:09.740 Maui[1535:27316] IOException for file /Users/admin/Projects/Maui/Maui/bin/Debug/Tmp/0000000001/0126.jpg
2023-08-13 21:47:09.750 Maui[1535:27316] Failed to upload file.

Looks like two different happenings. Where is the 421 message, the 226 message?

@FanDjango
Copy link
Collaborator

Closing, stale issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants