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

FluentFTP upload large file occurs exception :System.TimeoutException: Timed out trying to read data from the socket stream! #297

Closed
lanpioneer opened this issue May 10, 2018 · 2 comments

Comments

@lanpioneer
Copy link

lanpioneer commented May 10, 2018

FTP OS: Windows10 Version: 19.2.2.0

NetFramework version: 4.5.2

FTP Server: Vsftpd
Computer OS: Windows10

When I use FluentFTP upoad small file, that's Ok. But once I upload large file (such as 500M),it will be get exception while upload complete. In fact, the file uploaded success, even more I could unzip it at FTP server. The exception message is :
FluentFTP.FtpException: Error while uploading the file to the server. See InnerException for more info. ---> System.TimeoutException: Timed out trying to read data from the socket stream!
在 FluentFTP.FtpSocketStream.Read(Byte[] buffer, Int32 offset, Int32 count)
在 FluentFTP.FtpSocketStream.ReadLine(Encoding encoding)
在 FluentFTP.FtpClient.GetReply()
在 FluentFTP.FtpClient.UploadFileInternal(Stream fileData, String remotePath, Boolean createRemoteDir, FtpExists existsMode, Boolean fileExists, Boolean fileExistsKnown, IProgress1 progress) --- 内部异常堆栈跟踪的结尾 --- 在 FluentFTP.FtpClient.UploadFileInternal(Stream fileData, String remotePath, Boolean createRemoteDir, FtpExists existsMode, Boolean fileExists, Boolean fileExistsKnown, IProgress1 progress)
在 FluentFTP.FtpClient.Upload(Stream fileStream, String remotePath, FtpExists existsMode, Boolean createRemoteDir, IProgress`1 progress)
and I trace FTP log as flws:

And I found the trace log final step, that's shows "Response: 150 Ok to send data.". But why I could get exception which means Timed out trying to read data from the socket stream ...."

Logs :

# Upload("/384/20180510184243.zip", Overwrite, True)

# FileExists("/384/20180510184243.zip")
Status:   Testing connectivity using Socket.Poll()...
Command:  SIZE /384/20180510184243.zip
Response: 550 Could not get file size.

# DirectoryExists("/384")

# GetWorkingDirectory()
Command:  PWD
Response: 257 "/"
Command:  CWD /384
Response: 550 Failed to change directory.

# CreateDirectory("/384", True)

# DirectoryExists("/")

# DirectoryExists("/384")

# GetWorkingDirectory()
Command:  PWD
Response: 257 "/"
Command:  CWD /384
Response: 550 Failed to change directory.
Status:   CreateDirectory /384
Command:  MKD /384
Response: 257 "/384" created

# OpenWrite("/384/20180510184243.zip", Binary)
Command:  TYPE I
Response: 200 Switching to Binary mode.

# OpenPassiveDataStream(AutoPassive, "STOR /384/20180510184243.zip", 0)
Command:  EPSV
Response: 229 Entering Extended Passive Mode (|||5004|).
Status:   Connecting to xx.xx.xx:5004
Command:  STOR /384/20180510184243.zip
Response: 150 Ok to send data.
Status:   Disposing FtpSocketStream...
Status:   Testing connectivity using Socket.Poll()...
Status:   Disposing FtpSocketStream...
Status:   Disposing FtpSocketStream...

<paste logs here but DO NOT delete the lines above and below this line>
@franzvalo1
Copy link

I was having this trouble in a machine running Windows Server 2008 r2 and I resolved it by upgrading the Filezilla Server version from 0.9.41 to 0.9.60.
The messages from TimedOut were almost always accompained by a 426 Could Not create Socket, if you have been looking for the root problem maybe you should try upgrading before wasting time in your implementation.

@robinrodricks
Copy link
Owner

Sorry for the delayed response. Please test and let us know if this still occurs in v40. If it does I will reopen this.

@robinrodricks robinrodricks closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2022
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