-
-
Notifications
You must be signed in to change notification settings - Fork 657
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
NOOP should be counted and waited correctly #823
Comments
I am reusing the same connection to download multiple files. I have NOOP disabled because I have encountered the problems you have described (Stale Data problems). Since I do not need the NOOPs up to now I have not delved deeper in to the subject you describe, but I certainly agree with your analysis. |
i first tried not to use them but I experienced some disconnections, so in a way they helped me improve. I will try to provide a PR with some proposals. Cheers |
Why even track the NOOP responses? Why not just send them out into the void. If any Tracking them would tell us something is wrong if the responses don't come, but then we would at the same time have a lot of other indicators something is hanging. So... I could imagine just discarding the Your thoughts? |
So, I have been doing some fairly extensive testing on this and up to now I have not been able to reproduce the same problem as described above, where a NOOP response is wrongly considered a response to a different command. Even with a major stress test, But using NOOPs does have serious caveats because: Once I use encryption (see log number 2, below), things go very wrong: When the download finishes, the stale data (which is very probably Program:
Log #1 (no encryption active):
Log #2 (encryption active):
|
Two things:
|
I have added some more debug logging in some places. See the listing further below.
Currently I think the only way to make NOOPs work when the SSL stream is buffered, is to have two streams on the same socket. One for writing, one for reading. Note: The following (log of encrypted transfer, no buffering) contains extensive debugging messages not included in the normal code, and I have implemented a new
|
As a first step I have created PR #966. It will force disable SSL Buffering if a user explicitely wants NOOPs to be sent out. If and when NOOPs are made to work with SSL Buffering with no problems, this can be undone. |
We are not there yet by a long way... with my new versions of Server: proftpd Current status: .NET Framework 4.7Encryption OFF, .NET Framework 4.7: works Encryption ON, .NET Framework 4.7: works because SSL Buffering is turned off, but with current master: sometimes fails. Note the difference in the response text plain vs. encrypt .NET 6Encryption OFF, .NET 6: works Encryption ON, .NET 6, does not work even though SSL Buffering is turned off, symptoms similar to buffering is on Currently if you need to reliably use NOOPs, you need to either turn off encryption for best results or try .NET Framework, which will sometimes glitch with the current master. Also, your experience will vary depending on the server type and its configuration.I will concentrate on the new |
It is also worthwhile to read the following: Keep Alive Techniques I have found FTP clients that disallow configuring NOOPs when the connection is encrypted as well as servers, that allow you to block keep-alives (such as NOOP). It seems that many are having probems concerning this and there is a bit of chaos in how it is being addressed. So your mileage may vary when you try to keep your connection alive on a long running FTP. |
Thanks @FanDjango for all the research. If you cannot make progress, I suggest trying to work on something else. As your current fixes and findings are already much better than we had so far. |
Further development has taken place and is ongoing, I suggest checking the wiki regularly. |
The new version of |
Hi,
I am reusing the same connection to download multiple files. I have NOOP enabled because I sometimes experience timeouts.
Look at this log
As you can see the NOOP response arrived very late and was probably treated as the response to the PASV command.
I see the following issues here.
AvailableData
on the socket, which does not wait, so like in this scenario no data was actually available even if we knew that a NOOP response should arrive. So I would not use the check stale data function hereAny thought?
Thanks
A
The text was updated successfully, but these errors were encountered: