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

Timed out trying to read data from the socket stream! #55

Closed
makaronak opened this issue Mar 2, 2017 · 16 comments
Closed

Timed out trying to read data from the socket stream! #55

makaronak opened this issue Mar 2, 2017 · 16 comments

Comments

@makaronak
Copy link

makaronak commented Mar 2, 2017

Why this error happen on my virtual machine, but on my local it work good

Timed out trying to read data from the socket stream!

 ftpClient = new FtpClient
 {
                Host = settings.Host,
                Credentials = new NetworkCredential(settings.Login, settings.Password),
                EnableThreadSafeDataConnections = false,
                ReadTimeout = 30000,
                DataConnectionReadTimeout = 30000,
                DataConnectionType = FtpDataConnectionType.AutoActive     
 };

problem on windows server 2012 client

on windows 7 work good

@makaronak
Copy link
Author

windows server 2016 client error too

@robinrodricks
Copy link
Owner

robinrodricks commented Apr 14, 2017

Which function are you using? DownloadFile? Which function do you get the timeout on?

@robinrodricks
Copy link
Owner

Unless you reply its impossible to fix this.

@pbindy
Copy link

pbindy commented May 16, 2017

Hi,

I've just had this issue with the DeleteDirectory command.

@robinrodricks
Copy link
Owner

@pbindy Can you share more details. Are there any files/folders in the dir you are trying to delete? Which server are you using? Azure has problems with timeouts...

@pbindy
Copy link

pbindy commented May 16, 2017

Hi,

here is my code
if (FtpClient.DirectoryExists(folderPath)) FtpClient.DeleteDirectory(folderPath, true, true);

The folder has files in it, around 15.

I'm trying to transfer from a PC with Windows 10 to a coffee machine with Windows CE installed.

This issue is not reproducible every time. I had the issue twice in a row and then nothing.

What I did to fix it, I make sure that the folder is empty (delete all files in it) before calling DeleteDirectory.

@robinrodricks
Copy link
Owner

robinrodricks commented May 16, 2017

I see you are using the older version of FluentFTP. Can you upgrade to latest on nuget and check if it works for you? Because DeleteDirectory() has totally changed in that time...

@pbindy
Copy link

pbindy commented May 16, 2017

Ok I'll update to the latest version but there is definitely something happening with this DeleteDirectory method. (see #99 )

@robinrodricks
Copy link
Owner

You don't need to delete the files in it first. Just call DeleteDirectory and see if its working good. Because we have switched to LIST command instead of machine listings and we are getting all files recursively, then deleting those files, then deleting the folder last. You should not have any problems.

@pbindy
Copy link

pbindy commented May 16, 2017

I'll check it once again but I need to make a lot of testing before putting it in Production because it has to work 100% of the time.

@gjhdigital
Copy link

I realized this just got closed 4 hours ago, But I just ran into this issue today. I updated to the latest version v17.3.0 and I am still getting this error message when attempting to us FTPS using the code provided here: https://github.com/hgupta9/FluentFTP#faq_ftps

@robinrodricks
Copy link
Owner

@gjhdigital Okay, issue reopened. Which FTP server/OS are you using? or which host?

@gjhdigital
Copy link

nevermind, wrong protocol.

@robinrodricks
Copy link
Owner

@gjhdigital What was the solution so others can know?

@gjhdigital
Copy link

I was told the connection was FTPS when it was actually SFTP. So I ended up using the recommended SSH.NET package. Im using FluentFTP for another project and it works flawlessly for that.

@robinrodricks
Copy link
Owner

@gjhdigital Excellent, thank you.

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

4 participants