-
-
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
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host #104
Comments
I think I need to reread the spec, but can the connection close while data is being actively streamed to it though? |
@jblacker Good point. I created this "catch all" issue in case people were having trouble. I can't exactly explain or reproduce it. It just keeps coming up time and again so I assumed something was wrong with the methods. Also, I don't really know how/when Polling is done because it was written by JP Trosclair a long time ago. |
Yeah the polling is happening on the Socket level deep in the weeds in |
Amazing info. The 4 times sounds like a bug - I think once is enough? |
Yeah, I'd imagine once per interval would be enough. You can clearly see it happening in the log file posted in #99 (comment) |
I'm using FluentFTP for the first time and having a similar issue. My usage scenario is that every minutes it: The Connect always succeed, but either the GetListing or the Download throw me a System.Net.Sockets.SocketException (0x80004005) I used FileZilla to test the ftp server and can connect/disconnect and download any files hundreds of times and never encountered any error, so I believe it's a problem in the lib and not the server. |
I ended up dropping FluentFTP and using System.Net.FtpWebRequest directly, and it works all the time. |
catch this error while uploading 1 file (1KB). Is there any workaround ? |
I have the same problem. |
After differents tests, it would seem there is a timeout on the data connection ! |
I've got this situation, too!! My Test environment like this: Architecture: x64 Help me~~~ |
Same issue here downloading huge files. No news? |
Just in case there was any doubt this issue is still present. For me, it is occurring after listing a bunch of directories, and downloading a bunch of files (hundreds) at very high speed. It does not occur at lower network speeds. It's actually predictable, and will occur on the same file every time if the remote directory contents remains unchanged. I've also found that simply retrying the download causes the file contents to be incorrect. To work around, I've had to add Disconnect() and Connect() before retrying. I am really tempted to switch back to the native .NET FTP support, except it doesn't support extended FTP functionality such as CHMOD. |
I'm getting the exception with v33.1.0, v35.0.5 and a few versions in between (have not tested them all) But using v33.0.3 works without issues, exact same code. Release notes don't list any change that could trigger this. Setting Logging info with failing version (redacted):
Logging info with 33.0.3 (redacted):
If I need to submit more info, I'm happy to help. |
I did a test (like stress test) that connects to the FTPs server and download files. The test is executed in a loop, about 170 iterations. One iteration is to
170 iterations, 3 folders, 2 files in each folder. I've tried the FileZilla ftp server (both IIS ftpsI've used the https://medium.com/@sithum/create-ftps-server-on-windows-server-iis-in-5-minutes-sithum-devops-7a09823d91a4 guide to set up ftps with IIS The problem is that I'm getting error each 25 time - I can run test project three times in a row and three times it produces the same errors
The same (approximately) errors are thrown each time I'm running this test
FileZillaI've just installed FileZilla server and added a test user with the FileZilla server
There are less errors on FileZilla with 500ms pauses between each ftp call but
here are logs
I did those tests on my Windows 10 OS version 20H2 OS build 19042, 1288) test project uses the .Net Framework 4.8 and FluentFtp 35.0.5 Connection is FTPS w/ Explicit mode I've tried to add some |
@oleksabor Using your exact github code and connecting to a very high performace proftpd server of my own, I can reproduce the issue. I am getting the same errors ( your sln is using FluentFTP V35).After upgrading to FluentFTP V42 and making the few neccessary ->V40 migration changes, the problem STILL can be reproduced. So now we can start to search for the problem. |
Sorry I enlisted to the army and can't assist you or test any fix if available. |
Some first results of testing, using @oleksabor initial approach as a basis. The goal was to find out a little bit more about the real problem and to remove conjecture.
These commands do not use a data connection. No data connection (SSL) needs to be created and disposed. They only exercise the control connection. These commands are iterated up to 500 times with no waits in between. They always fail in the same way on the 474th iteration, on all of my available client systems.
|
So it seems that in this thread we are talking about two sepearate issues:
Long running processesThat is the original post and its title corresponds to the error you would see: The following was mentioned in this issue, related to this issue: a. Polling Polling is done whenever a FluentFTP method causes NOOP commands are actually the accepted way of keeping the control connection alive for long running transfers on the data connection. This issue is actually fixed. Strange errorsAfter performing large amounts of This is currently being investigated. See previous post. I will open a separate issue for this problem. This issue here can be closed, the solution is to use NOOPs, see the Wiki for this. |
NOTE FROM ADMIN:
If you have this issue, please add your post below instead of creating duplicate issues!
First try this, it disables polling.
And try this, it reduces the polling interval to ensure that the connection does not time-out.
Thanks.
Commonly occurs in:
For all the long running methods like UploadFileInternal and DowloadFileInternal and the above, we need to ensure that we poll the server to ensure its still connected. Could this be a fix to the "forcibly closed" error that we commonly receive?
The text was updated successfully, but these errors were encountered: