Giter VIP home page Giter VIP logo

Comments (12)

FanDjango avatar FanDjango commented on June 15, 2024

Make sure you try this with the absolute newest master cut from this repo. There were some possible problems on stream dispose recently (possible hang), which I fixed, an earlier release (up to 49.0.0).

Check if sync code or async code or both exhibit this problematic behaviour.

If debugging this remains tricky, consider writing the logs to a file directly, closing after each line. You need to get more information on this, so also consider examining the server log or taking a wireshark trace (which won't help altogether much in this scenario, I realize that).

I see client is Debian/ARM64, so I assume a RPi or something similar: You could run your application in a terminal and instead of logging, write the output to the terminal and see what goes on up to the hang?

from fluentftp.

dankaiadam avatar dankaiadam commented on June 15, 2024

I'm using the latest NuGet package, but with the limited time I had right now I pulled from the master repo and checked it out. Still the same behavior. Here are the logs I get:

Logs :


# Connect(False)
Status:   FluentFTP 49.0.2.0(.NET 6.0) FtpClient
Status:   Connecting to IP #1= ***:21
Status:   Waiting for a response
Response: 220-FileZilla Server 1.8.1
Response: 220 Please visit https://filezilla-project.org/ [738952.665d]
Status:   Detected FTP server: FileZilla
Command:  AUTH TLS
Status:   Waiting for response to: AUTH TLS
Response: 234 Using authentication type TLS. [29ms]
Status:   GnuTLS: 0   FluentFTP.GnuTLS 1.0.29.0(Unix/.NET 6.0) / GnuTLS 3.7.1
Status:   FTPS authentication successful, lib = FluentFTP.GnuTLS.GnuTlsStream, cipher suite = (TLS1.3)-(ECDHE-SECP256R1)-(ECDSA-SECP256R1-SHA256)-(AES-256-GCM) [304ms]
Command:  USER ***
Status:   Waiting for response to: USER ***
Response: 331 Please, specify the password. [41ms]
Command:  PASS ***
Status:   Waiting for response to: PASS ***
Response: 230 Login successful. [27ms]
Command:  PBSZ 0
Status:   Waiting for response to: PBSZ 0
Response: 200 PBSZ=0 [8ms]
Command:  PROT P
Status:   Waiting for response to: PROT P
Response: 200 Protection level set to P [2ms]
Command:  FEAT
Status:   Waiting for response to: FEAT
Response: 211-Features:
Response: MDTM
Response: REST STREAM
Response: SIZE
Response: MLST type*;size*;modify*;perm*;
Response: MLSD
Response: AUTH SSL
Response: AUTH TLS
Response: PROT
Response: PBSZ
Response: UTF8
Response: TVFS
Response: EPSV
Response: EPRT
Response: MFMT
Response: 211 End [4ms]
Status:   Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
Command:  OPTS UTF8 ON
Status:   Waiting for response to: OPTS UTF8 ON
Response: 202 UTF8 mode is always enabled. No need to send this command [4ms]
Command:  SYST
Status:   Waiting for response to: SYST
Response: 215 UNIX emulated by FileZilla. [6ms]
Status:   Active ServerHandler is: FileZilla
Status:   Listing parser set to: Machine
Command:  PWD
Status:   Waiting for response to: PWD
Response: 257 "/" is current directory. [6ms]

# UploadStream("rock.xz", Overwrite, False)

# FileExists("rock.xz")
Command:  SIZE /rock.xz
Status:   Waiting for response to: SIZE /rock.xz
Response: 213 565248 [35ms]

# DeleteFile("rock.xz")
Command:  DELE rock.xz
Status:   Waiting for response to: DELE rock.xz
Response: 250 File deleted successfully. [3ms]

# OpenWrite("rock.xz", Binary, -1, False)
Command:  TYPE I
Status:   Waiting for response to: TYPE I
Response: 200 Type set to I [4ms]

# OpenDataStream("STOR rock.xz", 0)

# OpenPassiveDataStream(AutoPassive, "STOR rock.xz", 0)
Command:  EPSV
Status:   Waiting for response to: EPSV
Response: 229 Entering Extended Passive Mode (|||54173|) [50ms]
Status:   Connecting to IP #1= ***:54173
Command:  STOR rock.xz
Status:   Waiting for response to: STOR rock.xz
Response: 150 Starting data transfer. [7ms]
Status:   FTPS authentication successful, lib = FluentFTP.GnuTLS.GnuTlsStream, cipher suite = (TLS1.3)-(ECDHE-PSK-SECP256R1)-(AES-256-GCM) [29ms]



Forgot to mention it, I'm using GnuTLS, but also tried it with plain FTP, same behavior.

from fluentftp.

FanDjango avatar FanDjango commented on June 15, 2024

Forgot to mention it, I'm using GnuTLS

On ARM64? Incredible. Didn't know that would work, totally untested when I wrote the GnuTLS wrapper. But on the other hand, why not?

But, at least we have a log. And can continue with that.

Still, to isolate the problem, it would be best to run with "plain FTP" - I assume you are referring to "not encrypted".

And then to produce the same log again. Yes, I suppose it will look the same and hang. How long have you ever left it hanging? It might timeout after a while and tell you more.

I would then, if at all possible, look at the (detailed, debug level) log of FileZilla if you can.

Can you try some other upload, not using UploadStream, but using UploadFile instead (upload some test file, perhaps). Let's confirm that upload basically works before using the stream upload logic, to further isolate the problem.

from fluentftp.

dankaiadam avatar dankaiadam commented on June 15, 2024

Can you try some other upload, not using UploadStream, but using UploadFile instead (upload some test file, perhaps). Let's confirm that upload basically works before using the stream upload logic, to further isolate the problem.

The methods on the other hand works fine, but having this problem the only thing I didn't try is UploadDirectory and UploadFiles.

Using not encrypted FTP gets the same results, but after hanging for ~15 minutes it closes the connection. Which timeout handle this that I missed?

FluentFTP Logs:

# Connect(False)
Status:   FluentFTP 49.0.2.0(.NET 6.0)
Status:   Connecting to IP #1= ***:21
Status:   Waiting for a response
Response: 220-FileZilla Server 1.8.1
Response: 220 Please visit https://filezilla-project.org/ [738953.692d]
Status:   Detected FTP server: FileZilla
Command:  USER ***
Status:   Waiting for response to: USER ***
Response: 331 Please, specify the password. [4ms]
Command:  PASS ***
Status:   Waiting for response to: PASS ***
Response: 230 Login successful. [35ms]
Command:  FEAT
Status:   Waiting for response to: FEAT
Response: 211-Features:
Response: MDTM
Response: REST STREAM
Response: SIZE
Response: MLST type*;size*;modify*;perm*;
Response: MLSD
Response: AUTH SSL
Response: AUTH TLS
Response: PROT
Response: PBSZ
Response: UTF8
Response: TVFS
Response: EPSV
Response: EPRT
Response: MFMT
Response: 211 End [3ms]
Status:   Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
Command:  OPTS UTF8 ON
Status:   Waiting for response to: OPTS UTF8 ON
Response: 202 UTF8 mode is always enabled. No need to send this command [3ms]
Command:  SYST
Status:   Waiting for response to: SYST
Response: 215 UNIX emulated by FileZilla. [2ms]
Status:   Active ServerHandler is: FileZilla
Status:   Listing parser set to: Machine
Command:  PWD
Status:   Waiting for response to: PWD
Response: 257 "/" is current directory. [2ms]

# UploadFile("rock.xz", "rock.xz", Overwrite, False, None)

# FileExists("rock.xz")
Command:  SIZE /rock.xz
Status:   Waiting for response to: SIZE /rock.xz
Response: 550 Couldn't open the file or directory [4ms]

# OpenWrite("rock.xz", Binary, -1, False)
Command:  TYPE I
Status:   Waiting for response to: TYPE I
Response: 200 Type set to I [2ms]

# OpenDataStream("STOR rock.xz", 0)

# OpenPassiveDataStream(AutoPassive, "STOR rock.xz", 0)
Command:  EPSV
Status:   Waiting for response to: EPSV
Response: 229 Entering Extended Passive Mode (|||64478|) [2ms]
Status:   Connecting to IP #1= ***:64478
Command:  STOR rock.xz
Status:   Waiting for response to: STOR rock.xz
Response: 150 Starting data transfer. [2ms]
Status:   Closing/Disposing FtpSocketStream(data connection)
Status:   IOException for file rock.xz : Unable to write data to the transport connection: No route to host.
Status:   Failed to upload file.

# Dispose()
Status:   Disposing FtpClient object...
Status:   Testing connectivity using Socket.Poll()...

# Disconnect()
Command:  QUIT
Status:   Waiting for response to: QUIT
Warning:  FtpClient.Disconnect(): Exception caught and discarded while closing control connection : Unable to read data from the transport connection: Connection timed out.
Status:   Closing/Disposing FtpSocketStream(control connection)
Status:   Closing/Disposing FtpSocketStream(control connection)

FileZilla Server Logs:

2024-03-09T16:36:15.643Z DI [FTP Session 3 192.168.0.18] Session 0x17d3f5b0660 with ID 3 created.
2024-03-09T16:36:15.643Z << [FTP Session 3 192.168.0.18] 220-FileZilla Server 1.8.1
2024-03-09T16:36:15.643Z << [FTP Session 3 192.168.0.18] 220 Please visit https://filezilla-project.org/
2024-03-09T16:36:15.676Z >> [FTP Session 3 192.168.0.18] USER test
2024-03-09T16:36:15.687Z DI [Throttled Authenticator, FTP Session: 3] Authenticating user test from IP 192.168.0.18.
2024-03-09T16:36:15.687Z DD [File-based Authenticator, FTP Session: 3] Invoked authenticate(()) on worker 0x17d3f5a19e0, with available methods = []
2024-03-09T16:36:15.687Z DD [File-based Authenticator, FTP Session: 3] Authentication for user 'test' not complete. Remaning methods: [password]
2024-03-09T16:36:15.687Z DD [File-based Authenticator, FTP Session: 3] Worker 0x17d3f5a19e0 created new operation 0x17d3f536bc0, with shared_user = 0x0, methods = [password], error = 0
2024-03-09T16:36:15.687Z DD [Throttled Authenticator, FTP Session: 3] Worker 0x18865fcb50 created new operation 0x17d3f53aed0
2024-03-09T16:36:15.687Z << [FTP Session 3 192.168.0.18] 331 Please, specify the password.
2024-03-09T16:36:15.691Z >> [FTP Session 3 192.168.0.18] PASS ****
2024-03-09T16:36:15.691Z DD [File-based Authenticator, FTP Session: 3] Invoked authenticate((password)) on worker 0x17d3f5a19e0, with available methods = [password]
2024-03-09T16:36:15.691Z DV [File-based Authenticator, FTP Session: 3] Authenticating user 'test'. Methods requested: (password). Available methods: [password].
2024-03-09T16:36:15.723Z DV [File-based Authenticator, FTP Session: 3] Auth method password passed for user 'test'.
2024-03-09T16:36:15.723Z DV [File-based Authenticator, FTP Session: 3] impersonation_token: { username: "", home: "" }
2024-03-09T16:36:15.723Z DV [File-based Authenticator, FTP Session: 3] Authentication for user 'test' is complete.
2024-03-09T16:36:15.723Z DI [File-based Authenticator, user: test] Effective mount points:
2024-03-09T16:36:15.723Z DI [File-based Authenticator, user: test]   > "/" -> "C:\ftptest" 
2024-03-09T16:36:15.723Z DV [File-based Authenticator, FTP Session: 3] impersonation_token: { username: "", home: "" }
2024-03-09T16:36:15.723Z DD [File-based Authenticator, FTP Session: 3] Worker 0x17d3f5a19e0 created new operation 0x17d3f537480, with shared_user = 0x17d3f5b43c0, methods = [], error = 0
2024-03-09T16:36:15.723Z DD [Throttled Authenticator, FTP Session: 3] Worker 0x18865fcb50 created new operation 0x17d3f53b1b0
2024-03-09T16:36:15.723Z DD [File-based Authenticator, FTP Session: 3] operation 0x17d3f537480 stop() erasing worker 0x17d3f5a19e0
2024-03-09T16:36:15.723Z DD [Throttled Authenticator, FTP Session: 3] operation 0x17d3f53b1b0 stop() erasing worker 0x17d3ec1bd30
2024-03-09T16:36:15.723Z << [FTP Session 3 192.168.0.18] 230 Login successful.
2024-03-09T16:36:15.739Z >> [FTP Session 3 192.168.0.18 test] FEAT
2024-03-09T16:36:15.739Z << [FTP Session 3 192.168.0.18 test] 211-Features:
2024-03-09T16:36:15.739Z << [FTP Session 3 192.168.0.18 test] 211 End
2024-03-09T16:36:15.740Z >> [FTP Session 3 192.168.0.18 test] OPTS UTF8 ON
2024-03-09T16:36:15.740Z << [FTP Session 3 192.168.0.18 test] 202 UTF8 mode is always enabled. No need to send this command
2024-03-09T16:36:15.740Z >> [FTP Session 3 192.168.0.18 test] SYST
2024-03-09T16:36:15.740Z << [FTP Session 3 192.168.0.18 test] 215 UNIX emulated by FileZilla.
2024-03-09T16:36:15.755Z >> [FTP Session 3 192.168.0.18 test] PWD
2024-03-09T16:36:15.755Z << [FTP Session 3 192.168.0.18 test] 257 "/" is current directory.
2024-03-09T16:36:15.756Z >> [FTP Session 3 192.168.0.18 test] SIZE /rock.xz
2024-03-09T16:36:15.756Z DD [FTP Session 3 192.168.0.18 test/TVFS/local_filesys] info(C:\ftptest\rock.xz): result: 7
2024-03-09T16:36:15.771Z << [FTP Session 3 192.168.0.18 test] 550 Couldn't open the file or directory
2024-03-09T16:36:15.771Z >> [FTP Session 3 192.168.0.18 test] TYPE I
2024-03-09T16:36:15.771Z << [FTP Session 3 192.168.0.18 test] 200 Type set to I
2024-03-09T16:36:15.771Z >> [FTP Session 3 192.168.0.18 test] EPSV
2024-03-09T16:36:15.771Z DV [FTP Session 3 192.168.0.18 test] Trying listen(1, 0) for data connection.
2024-03-09T16:36:15.771Z << [FTP Session 3 192.168.0.18 test] 229 Entering Extended Passive Mode (|||64478|)
2024-03-09T16:36:15.787Z DV [FTP Session 3 192.168.0.18 test] session::on_socket_event(): source = data listen, flag = 2, error = 0, state = -1
2024-03-09T16:36:15.787Z DV [FTP Session 3 192.168.0.18 test] session::on_socket_event(): source = data, flag = 8, error = 0, state = 2
2024-03-09T16:36:15.787Z >> [FTP Session 3 192.168.0.18 test] STOR rock.xz
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test/TVFS/local_filesys] open_file(C:\ftptest\rock.xz): fd = 932, res = 0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test] CHANNEL state is being dumped:
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test] PIPE((IN)) {
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     max_num_loops_           = 10
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     thread_safe_             = 0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     variant_buffer_          = <2>
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     variant_adder_           = <2>
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     variant_consumer_        = <2>
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     buffer_                  = 0x17d3f5b1c10
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     adder_                   = 0x0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     consumer_                = 0x0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     waiting_for_adder_event_ = 0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     consumer_error_          = 0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     adder_error_             = 0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test] }
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test] PIPE((OUT)) {
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     max_num_loops_           = 10
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     thread_safe_             = 0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     variant_buffer_          = <2>
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     variant_adder_           = <2>
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     variant_consumer_        = <2>
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     buffer_                  = 0x17d3f5b1ad8
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     adder_                   = 0x0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     consumer_                = 0x0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     waiting_for_adder_event_ = 0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     consumer_error_          = 0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test]     adder_error_             = 0
2024-03-09T16:36:15.787Z DD [FTP Session 3 192.168.0.18 test] }
2024-03-09T16:36:15.787Z << [FTP Session 3 192.168.0.18 test] 150 Starting data transfer.

from fluentftp.

FanDjango avatar FanDjango commented on June 15, 2024

Thank you for doing this without encryption, which of course is not always possible, I know. Thanks to this, you can see:

Status: IOException for file rock.xz : Unable to write data to the transport connection: No route to host.

There is your explanation. The server offers (with EPSV) a IP you can't reach (?).

Consider isolating the problem further by forcing passive instead of autopassive (which allows EPSV).

And then compare the address offered with your network config/situation - try to find the explanation for "No route to host".

If there is no explanation that looks obvious: I would like to see a log of a test upload of a small test file using UploadFile(...).

from fluentftp.

dankaiadam avatar dankaiadam commented on June 15, 2024

Sorry for the late response, here are the logs with forcing passive mode, and uploading a small file.

FluentFTP Logs:

# Connect(False)
Status:   FluentFTP 49.0.2.0(.NET 6.0)
Status:   Connecting to IP #1= ***:21
Status:   Waiting for a response
Response: 220-FileZilla Server 1.8.1
Response: 220 Please visit https://filezilla-project.org/ [738969.366d]
Status:   Detected FTP server: FileZilla
Command:  USER ***
Status:   Waiting for response to: USER ***
Response: 331 Please, specify the password. [3ms]
Command:  PASS ***
Status:   Waiting for response to: PASS ***
Response: 230 Login successful. [34ms]
Command:  FEAT
Status:   Waiting for response to: FEAT
Response: 211-Features:
Response: MDTM
Response: REST STREAM
Response: SIZE
Response: MLST type*;size*;modify*;perm*;
Response: MLSD
Response: AUTH SSL
Response: AUTH TLS
Response: PROT
Response: PBSZ
Response: UTF8
Response: TVFS
Response: EPSV
Response: EPRT
Response: MFMT
Response: 211 End [3ms]
Status:   Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
Command:  OPTS UTF8 ON
Status:   Waiting for response to: OPTS UTF8 ON
Response: 202 UTF8 mode is always enabled. No need to send this command [3ms]
Command:  SYST
Status:   Waiting for response to: SYST
Response: 215 UNIX emulated by FileZilla. [2ms]
Status:   Active ServerHandler is: FileZilla
Status:   Listing parser set to: Machine
Command:  PWD
Status:   Waiting for response to: PWD
Response: 257 "/" is current directory. [3ms]

# UploadFile("small.txt", "small.txt", Overwrite, False, None)

# FileExists("small.txt")
Command:  SIZE /small.txt
Status:   Waiting for response to: SIZE /small.txt
Response: 213 1966080 [6ms]

# DeleteFile("small.txt")
Command:  DELE small.txt
Status:   Waiting for response to: DELE small.txt
Response: 250 File deleted successfully. [4ms]

# OpenWrite("small.txt", Binary, -1, False)
Command:  TYPE I
Status:   Waiting for response to: TYPE I
Response: 200 Type set to I [1ms]

# OpenDataStream("STOR small.txt", 0)

# OpenPassiveDataStream(PASV, "STOR small.txt", 0)
Command:  PASV
Status:   Waiting for response to: PASV
Response: 227 Entering Passive Mode (192,168,0,143,211,78) [4ms]
Status:   PASV advertised a non-routable IPAD. Using original connect dnsname/IPAD
Status:   Connecting to IP #1= ***:54094
Command:  STOR small.txt
Status:   Waiting for response to: STOR small.txt
Response: 150 Starting data transfer. [3ms]
Status:   Uploaded 4082530 bytes
Status:   Closing/Disposing FtpSocketStream(data connection)
Status:   Waiting for response to: STOR small.txt
Response: 226 Operation successful [183ms]

# Dispose()
Status:   Disposing FtpClient object...

# Disconnect()
Command:  QUIT
Status:   Waiting for response to: QUIT
Response: 221 Goodbye. [2ms]
Status:   Closing/Disposing FtpSocketStream(control connection)
Status:   Closing/Disposing FtpSocketStream(control connection)

FileZilla Server Logs:

2024-03-25T08:47:08.663Z << [FTP Session 4 192.168.0.18] 220-FileZilla Server 1.8.1
2024-03-25T08:47:08.663Z << [FTP Session 4 192.168.0.18] 220 Please visit https://filezilla-project.org/
2024-03-25T08:47:08.694Z >> [FTP Session 4 192.168.0.18] USER test
2024-03-25T08:47:08.694Z DI [Throttled Authenticator, FTP Session: 4] Authenticating user test from IP 192.168.0.18.
2024-03-25T08:47:08.694Z DD [File-based Authenticator, FTP Session: 4] Invoked authenticate(()) on worker 0x1cdd55c82b0, with available methods = []
2024-03-25T08:47:08.694Z DD [File-based Authenticator, FTP Session: 4] Authentication for user 'test' not complete. Remaning methods: [password]
2024-03-25T08:47:08.694Z DD [File-based Authenticator, FTP Session: 4] Worker 0x1cdd55c82b0 created new operation 0x1cdd5e16fb0, with shared_user = 0x0, methods = [password], error = 0
2024-03-25T08:47:08.694Z DD [Throttled Authenticator, FTP Session: 4] Worker 0x8750dfcf70 created new operation 0x1cdd5e120f0
2024-03-25T08:47:08.694Z << [FTP Session 4 192.168.0.18] 331 Please, specify the password.
2024-03-25T08:47:08.711Z >> [FTP Session 4 192.168.0.18] PASS ****
2024-03-25T08:47:08.711Z DD [File-based Authenticator, FTP Session: 4] Invoked authenticate((password)) on worker 0x1cdd55c82b0, with available methods = [password]
2024-03-25T08:47:08.711Z DV [File-based Authenticator, FTP Session: 4] Authenticating user 'test'. Methods requested: (password). Available methods: [password].
2024-03-25T08:47:08.742Z DV [File-based Authenticator, FTP Session: 4] Auth method password passed for user 'test'.
2024-03-25T08:47:08.742Z DV [File-based Authenticator, FTP Session: 4] impersonation_token: { username: "", home: "" }
2024-03-25T08:47:08.742Z DV [File-based Authenticator, FTP Session: 4] Authentication for user 'test' is complete.
2024-03-25T08:47:08.742Z DI [File-based Authenticator, user: test] Effective mount points:
2024-03-25T08:47:08.742Z DI [File-based Authenticator, user: test]   > "/" -> "C:\ftptest" 
2024-03-25T08:47:08.742Z DV [File-based Authenticator, FTP Session: 4] impersonation_token: { username: "", home: "" }
2024-03-25T08:47:08.742Z DD [File-based Authenticator, FTP Session: 4] Worker 0x1cdd55c82b0 created new operation 0x1cdd5e16d30, with shared_user = 0x1cdd55eef00, methods = [], error = 0
2024-03-25T08:47:08.742Z DD [Throttled Authenticator, FTP Session: 4] Worker 0x8750dfcf70 created new operation 0x1cdd5e11f50
2024-03-25T08:47:08.742Z DD [File-based Authenticator, FTP Session: 4] operation 0x1cdd5e16d30 stop() erasing worker 0x1cdd55c82b0
2024-03-25T08:47:08.742Z DD [Throttled Authenticator, FTP Session: 4] operation 0x1cdd5e11f50 stop() erasing worker 0x1cdd5e6d070
2024-03-25T08:47:08.742Z << [FTP Session 4 192.168.0.18] 230 Login successful.
2024-03-25T08:47:08.742Z >> [FTP Session 4 192.168.0.18 test] FEAT
2024-03-25T08:47:08.742Z << [FTP Session 4 192.168.0.18 test] 211-Features:
2024-03-25T08:47:08.742Z << [FTP Session 4 192.168.0.18 test] 211 End
2024-03-25T08:47:08.757Z >> [FTP Session 4 192.168.0.18 test] OPTS UTF8 ON
2024-03-25T08:47:08.757Z << [FTP Session 4 192.168.0.18 test] 202 UTF8 mode is always enabled. No need to send this command
2024-03-25T08:47:08.757Z >> [FTP Session 4 192.168.0.18 test] SYST
2024-03-25T08:47:08.757Z << [FTP Session 4 192.168.0.18 test] 215 UNIX emulated by FileZilla.
2024-03-25T08:47:08.757Z >> [FTP Session 4 192.168.0.18 test] PWD
2024-03-25T08:47:08.757Z << [FTP Session 4 192.168.0.18 test] 257 "/" is current directory.
2024-03-25T08:47:08.773Z >> [FTP Session 4 192.168.0.18 test] SIZE /small.txt
2024-03-25T08:47:08.773Z DD [FTP Session 4 192.168.0.18 test/TVFS/local_filesys] info(C:\ftptest\small.txt): result: 0
2024-03-25T08:47:08.773Z << [FTP Session 4 192.168.0.18 test] 213 1966080
2024-03-25T08:47:08.789Z >> [FTP Session 4 192.168.0.18 test] DELE small.txt
2024-03-25T08:47:08.789Z DD [FTP Session 4 192.168.0.18 test/TVFS/local_filesys] remove_file(C:\ftptest\small.txt): result: 0
2024-03-25T08:47:08.789Z << [FTP Session 4 192.168.0.18 test] 250 File deleted successfully.
2024-03-25T08:47:08.789Z >> [FTP Session 4 192.168.0.18 test] TYPE I
2024-03-25T08:47:08.789Z << [FTP Session 4 192.168.0.18 test] 200 Type set to I
2024-03-25T08:47:08.804Z >> [FTP Session 4 192.168.0.18 test] PASV
2024-03-25T08:47:08.804Z DV [FTP Session 4 192.168.0.18 test] Trying listen(1, 0) for data connection.
2024-03-25T08:47:08.804Z << [FTP Session 4 192.168.0.18 test] 227 Entering Passive Mode (192,168,0,143,211,78)
2024-03-25T08:47:08.804Z DV [FTP Session 4 192.168.0.18 test] session::on_socket_event(): source = data listen, flag = 2, error = 0, state = -1
2024-03-25T08:47:08.804Z DV [FTP Session 4 192.168.0.18 test] session::on_socket_event(): source = data, flag = 8, error = 0, state = 2
2024-03-25T08:47:08.804Z >> [FTP Session 4 192.168.0.18 test] STOR small.txt
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test/TVFS/local_filesys] open_file(C:\ftptest\small.txt): fd = 972, res = 0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test] CHANNEL state is being dumped:
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test] PIPE((IN)) {
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     max_num_loops_           = 10
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     thread_safe_             = 0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     variant_buffer_          = <2>
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     variant_adder_           = <2>
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     variant_consumer_        = <2>
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     buffer_                  = 0x1cdd5e64dc0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     adder_                   = 0x0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     consumer_                = 0x0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     waiting_for_adder_event_ = 0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     consumer_error_          = 0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     adder_error_             = 0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test] }
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test] PIPE((OUT)) {
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     max_num_loops_           = 10
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     thread_safe_             = 0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     variant_buffer_          = <2>
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     variant_adder_           = <2>
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     variant_consumer_        = <2>
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     buffer_                  = 0x1cdd5e64c88
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     adder_                   = 0x0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     consumer_                = 0x0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     waiting_for_adder_event_ = 0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     consumer_error_          = 0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test]     adder_error_             = 0
2024-03-25T08:47:08.804Z DD [FTP Session 4 192.168.0.18 test] }
2024-03-25T08:47:08.804Z << [FTP Session 4 192.168.0.18 test] 150 Starting data transfer.
2024-03-25T08:47:08.995Z DV [FTP Session 4 192.168.0.18 test] data_socket_->shutdown() = 0
2024-03-25T08:47:08.995Z << [FTP Session 4 192.168.0.18 test] 226 Operation successful
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test] session::close_data_connection(): prev data_connection_status = 2
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test] Removed done events: 0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event] CHANNEL state is being dumped:
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event] PIPE((IN)) {
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     max_num_loops_           = 10
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     thread_safe_             = 0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     variant_buffer_          = <2>
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     variant_adder_           = <2>
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     variant_consumer_        = <2>
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     buffer_                  = 0x1cdd5e64dc0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     adder_                   = 0x0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     consumer_                = 0x0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     waiting_for_adder_event_ = 0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     consumer_error_          = 0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     adder_error_             = 0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event] }
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event] PIPE((OUT)) {
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     max_num_loops_           = 10
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     thread_safe_             = 0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     variant_buffer_          = <2>
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     variant_adder_           = <2>
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     variant_consumer_        = <2>
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     buffer_                  = 0x1cdd5e64c88
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     adder_                   = 0x0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     consumer_                = 0x0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     waiting_for_adder_event_ = 0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     consumer_error_          = 0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event]     adder_error_             = 0
2024-03-25T08:47:08.995Z DD [FTP Session 4 192.168.0.18 test/Done Event] }
2024-03-25T08:47:08.995Z >> [FTP Session 4 192.168.0.18 test] QUIT
2024-03-25T08:47:08.995Z << [FTP Session 4 192.168.0.18 test] 221 Goodbye.
2024-03-25T08:47:08.995Z == [FTP Server] Session 4 ended gracefully.
2024-03-25T08:47:08.995Z DI [FTP Session 4 192.168.0.18] Session 0x1cdd5e63810 with ID 4 destroyed.
2024-03-25T08:47:51.634Z DD [Administration Server] tls_layer_impl::on_read()

from fluentftp.

FanDjango avatar FanDjango commented on June 15, 2024

So that looks good - using PASV: it works, right?

from fluentftp.

dankaiadam avatar dankaiadam commented on June 15, 2024

Yes, it works.

from fluentftp.

FanDjango avatar FanDjango commented on June 15, 2024

It works many times? Not only once?

from fluentftp.

dankaiadam avatar dankaiadam commented on June 15, 2024

Yes, sorry I wasn't clear, the upload itself works as intended, but I wanted to handle the connection interruptions and wanted to configure if the connection lost between the server and the client that it doesn't want to retry for ~15 minutes.

from fluentftp.

FanDjango avatar FanDjango commented on June 15, 2024

It's just hangs

Hmmm. I see, so I have misunderstood the actual problem.

You are trying to say: "It shouldn't just hang (forever), it should abort with an exception or something".

I wonder if the .NET implementation on ARM is somehow not responding correctly to connection outages? Because FluentFTP should be getting some kind of exception or timeout from the socket level.

Perhaps you could run the code async and also initiate a timer task to cancel if it hangs for more than a minute or so?

from fluentftp.

dankaiadam avatar dankaiadam commented on June 15, 2024

Thank you, it works now how I wanted! Sort of..
I remembered, that I tried to cancel it if it hangs, with CancellationToken but it didn't work. And now further looking into it, my problem originates from GnuTLS. I'm going to open a new issue over there explaining it, and we can close this one.

Once more, thank you so much for you help!

from fluentftp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.