FluentFTP
FluentFTP copied to clipboard
TransferFileAsync TLS error
FTP OS: Linux
FTP Server: glFTPd
Computer OS: Windows 10
FluentFTP Version: Latest
Logs :
This happens when I try to simply FXP 1 file from one server to another, which are both running glFTPd w/TLS v1.3
Response: 435 Failed TLS negotiation on data channel (timeout), disconnected
Response: 435 Failed TLS negotiation on data channel (timeout), disconnected
Response: 435 Failed TLS negotiation on data channel (SSL_accept(): (5) error:00000000:lib(0):func(0):reason(0)), disconnected
Response: 435 Failed TLS negotiation on data channel (SSL_accept(): (5) error:00000000:lib(0):func(0):reason(0)), disconnected
The issue can be fixed, but its a hack; you have to edit "FtpClient_FXPConnection.cs" goto line 154, and replace the following "if" command:
// send PASV command to destination FTP server to get passive port to be used from source FTP server
if (!(reply = await destinationClient.ExecuteAsync("PASV", token)).Success) {
throw new FtpCommandException(reply);
}
With this:
if(!(reply = await destinationClient.ExecuteAsync("CPSV", token)).Success)
{
// send PASV command to destination FTP server to get passive port to be used from source FTP server
if (!(reply = await destinationClient.ExecuteAsync("PASV", token)).Success) {
throw new FtpCommandException(reply);
}
}
However, I still think there should be some other way to solve this issue by adding a custom handler for glFTPd or something like it...
Sorry for the late response. Just got around to doing this.
I added your fix by default for all servers - I don't see the harm. However I inverted the logic - I try PASV first and then CPSV as a fallback since its less commonly supported.
Could you try this build please:
Released.
https://www.nuget.org/packages/FluentFTP/35.0.2
Hi @m4mm0n, can you try the latest build from nuget and tell me if it resolves your issue? I need feedback on this please.