Comments (8)
@adfansong I merged a fix for this and perhaps you can check it out on the current master?
from fluentftp.
I need to see a complete log, (nearly) all the responses are missing (or are there none?).
[Verbose] Status: Waiting for response to: RETR /2.dzip
Why does this appear 3 times? Need to see your source code.
What is the server type? FileZilla or IIS? Which version FileZilla?
Using Mono: always a bit difficult to help with that. Please supply more information.
from fluentftp.
Oh, and try using passive FTP mode instead of ACTIVE mode.
from fluentftp.
I need to see a complete log, (nearly) all the responses are missing (or are there none?).
[Verbose] Status: Waiting for response to: RETR /2.dzip
Why does this appear 3 times? Need to see your source code.
What is the server type? FileZilla or IIS? Which version FileZilla?
Using Mono: always a bit difficult to help with that. Please supply more information.
Thanks for your reply.
- I wrote a simple test to get logs and stacks.
[Verbose] > Connect(False)
[Verbose] Status: FluentFTP 49.0.2.0(.NET Standard 2.1) AsyncFtpClient
[Info] Status: Connecting to IP #1= ***:21
[Verbose] Status: Waiting for a response
[Verbose] Response: 220-FileZilla Server 1.8.1
[Info] Response: 220 Please visit https://filezilla-project.org/ [738944.456d]
[Info] Status: Detected FTP server: FileZilla
[Info] Command: USER ***
[Verbose] Status: Waiting for response to: USER ***
[Info] Response: 331 Please, specify the password. [109ms]
[Info] Command: PASS ***
[Verbose] Status: Waiting for response to: PASS ***
[Info] Response: 230 Login successful. [139ms]
[Info] Command: FEAT
[Verbose] Status: Waiting for response to: FEAT
[Verbose] 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
[Info] Response: 211 End [444ms]
[Info] Status: Text encoding: System.Text.UTF8Encoding
[Info] Command: OPTS UTF8 ON
[Verbose] Status: Waiting for response to: OPTS UTF8 ON
[Info] Response: 202 UTF8 mode is always enabled. No need to send this command [187ms]
[Info] Command: SYST
[Verbose] Status: Waiting for response to: SYST
[Info] Response: 215 UNIX emulated by FileZilla. [81ms]
[Verbose] Status: Active ServerHandler is: FileZilla
[Verbose] Status: Listing parser set to: Machine
[Info] Command: PWD
[Verbose] Status: Waiting for response to: PWD
[Info] Response: 257 "/" is current directory. [75ms]
connected.
[Verbose] > DownloadFile("e://soft/download/1.dzip", "/1.dzip", Resume, None)
[Verbose] > OpenRead("/1.dzip", Binary, 0, 0, False)
[Verbose] > GetFileSize("/1.dzip", -1)
[Info] Command: SIZE /1.dzip
[Verbose] Status: Waiting for response to: SIZE /1.dzip
[Info] Response: 213 346 [23ms]
[Info] Command: TYPE I
[Verbose] Status: Waiting for response to: TYPE I
[Info] Response: 200 Type set to I [50ms]
[Verbose] > OpenDataStreamAsync("RETR /1.dzip", 0)
[Verbose] > OpenPassiveDataStreamAsync(AutoPassive, "RETR /1.dzip", 0)
[Info] Command: EPSV
[Verbose] Status: Waiting for response to: EPSV
[Info] Response: 229 Entering Extended Passive Mode (|||11382|) [139ms]
[Info] Status: Connecting to IP #1= ***:11382
[Info] Command: RETR /1.dzip
[Verbose] Status: Waiting for response to: RETR /1.dzip
[Info] Response: 150 Starting data transfer. [72ms]
[Verbose] Status: Downloaded 346 bytes
[Verbose] Status: AsyncFtpClient incorrectly called Close(sync)
[Verbose] Status: Disposing(sync) FtpSocketStream(data connection of AsyncFtpClient)
[Verbose] > CloseDataStream()
[Verbose] Status: Waiting for response to: RETR /1.dzip
[Info] Response: 226 Operation successful [93ms]
[Verbose] Status: Waiting for response to: RETR /1.dzip
[Verbose] Status: Disposing(async) FtpSocketStream(control connection of AsyncFtpClient)
[Verbose] Status: AsyncFtpClient incorrectly called Close(sync)
TimeoutException: Timed out trying to read data from the socket stream!
The test code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using FluentFTP;
using UnityEngine;
public class FluentFTPTest : MonoBehaviour {
public string host = "192.168.0.103";
public string user = "test";
public string pwd = "123";
public int port = 0;
private AsyncFtpClient client;
// Start is called before the first frame update
void Start() {
testCo();
}
async Task testCo() {
try {
var tokenSource = new CancellationTokenSource();
var client = new AsyncFtpClient(host, user, pwd, port);
// TEST
client.Config.LogToConsole = true;
client.Config.DataConnectionType = FtpDataConnectionType.AutoPassive;
client.LegacyLogger = (level, s) => {
Debug.Log($"[{level}] {s}");
};
await client.Connect(tokenSource.Token);
Debug.Log("connected.");
await client.DownloadFile("e://soft/download/1.dzip", "/1.dzip", token:tokenSource.Token);
Debug.Log("done.");
} catch (Exception e) {
Debug.LogException(e);
throw;
}
}
}
for 3 times:
- FtpSocketStream/
- .AsyncFtpClient/ -> FtpDataStream:Close
- .AsyncFtpClient/ -> GetReplyInternal
- Now I use FileZilla Server 1.8.1, IIS the same before
from fluentftp.
Oh, and try using passive FTP mode instead of ACTIVE mode.
How to set that?
I tried to set DataConnectionType to AutoPassive / PASV, same error.
from fluentftp.
Ok, I see the source code.
And I made a mistake concerning ACTIVE/PASSIVE, I was in a hurry. It is PASSIVE (see the EPSV, means extended passive mode). My bad.
from fluentftp.
I am able to reproduce the problem and am looking for a fix. Thanks for reporting this!
from fluentftp.
@adfansong I merged a fix for this and perhaps you can check it out on the current master?
Thanks for your quick support, it's ok now!
from fluentftp.
Related Issues (20)
- Expection FluentFTP.Exceptions.FtpCommandException: Code: 550 Message: Command not recognized or allowed when use GetListing method HOT 2
- AuthenticateAsClientAsync doesn't respect ReadTimeout in a certain scenario HOT 4
- FtpException thrown downloading file with 49.0.2 works in 49.0.1 HOT 4
- Problems uploading a file into a ftp server with TLS HOT 7
- AsyncFtpClient - The operation has timed out HOT 27
- PRT and EPRT don't respect the configured proxy HOT 6
- GetObjectInfo fails for file names with spaces HOT 6
- Error on FTP UPDATFILE after sucessfull connect HOT 1
- Override Read(Span), ReadAsync(Memory), Write(ROS), WriteAsync(ROM) in streams HOT 3
- Issue with AS400 change - AfterConnect actions cannot be undone HOT 21
- Should FTP work be done with temp files? HOT 5
- GetListing Chinese garbled characters HOT 3
- Timeouts when downloading certain files HOT 2
- ftp.GetListing(path) HOT 1
- using the GetListing Error HOT 2
- FluentFTP.GnuTLS possible memory leak HOT 7
- UploadDirectory in Mirror mode occasionally deletes destination folder's entire contents HOT 5
- Allways getting Timed Out error while using Azure Funtions to connect an FTPs HOT 2
- Timed out trying to read data from the socket stream HOT 10
- Code: 550 Message: Command STOR failed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentftp.