FluentFTP: GetListing - One or more errors occurred. ( Received an unexpected EOF or 0 bytes from the transport stream.)
FTP OS: Unix / Windows / Embedded
FTP Server: FileZilla Server 0.9.60
Computer OS: Windows 10
FluentFTP Version: 40.0
Framework: .NET 6
Hi - we have an problem with an FTP Server - where GetListing does throw an exception. Any ideas?
System.AggregateException: “One or more errors occurred. ( Received an unexpected EOF or 0 bytes from the transport stream.)”
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ThrowIfExceptional(bool includeTaskCanceledExceptions) Zeile 1883 C#
System.Private.CoreLib.dll!System.Threading.Tasks.Task.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Zeile 2733 C#
System.Private.CoreLib.dll!System.Threading.Tasks.Task.Wait() Zeile 2607 C#
[Warten auf asynchronen Vorgang, Doppelklick oder EINGABE zur Anzeige asynchroner Aufruflisten]
FluentFTP.dll!FluentFTP.FtpSocketStream.ActivateEncryption(string targethost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCerts, System.Security.Authentication.SslProtocols sslProtocols) Unbekannt
FluentFTP.dll!FluentFTP.FtpClient.OpenPassiveDataStream(FluentFTP.FtpDataConnectionType type, string command, long restart) Unbekannt
FluentFTP.dll!FluentFTP.FtpClient.OpenDataStream(string command, long restart) Unbekannt
FluentFTP.dll!FluentFTP.FtpClient.GetListingInternal(string listcmd, FluentFTP.FtpListOption options, bool retry) Unbekannt
FluentFTP.dll!FluentFTP.FtpClient.GetListing(string path, FluentFTP.FtpListOption options) Unbekannt
FluentFTP.dll!FluentFTP.FtpClient.GetListing() Unbekannt
FluentExample.dll!FluentFTPTest.FluentFTP_Error1() Zeile 22 C# FluentExample.dll!Program.<Main>$(string[] args) Zeile 4 C#
Logs :
# AutoConnect()
# AutoDetect(True, False)
# Connect()
Status: Connecting to ***:21
Response: 220 FileZilla Server 0.9.60 beta written by Tim Kosse (Tim.Kosse@gmx.de) Please visit http://sourceforge.
Status: Detected FTP server: FileZilla
Command: AUTH TLS
Response: 234 Using authentication type TLS
Status: FTPS Authentication Successful
Status: Time to activate encryption: 0h 0m 0s. Total Seconds: 0,1323288.
Command: USER ***
Response: 331 Password required for ***
Command: PASS ***
Response: 230 Logged on
Command: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Response: 200 Protection level set to P
Command: FEAT
Response: 211-Features:
Response: MDTM
Response: REST STREAM
Response: SIZE
Response: MLST type*;size*;modify*;
Response: MLSD
Response: AUTH SSL
Response: AUTH TLS
Response: PROT
Response: PBSZ
Response: UTF8
Response: CLNT
Response: MFMT
Response: EPSV
Response: EPRT
Response: 211 End
Status: Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
Command: OPTS UTF8 ON
Response: 202 UTF8 mode is always enabled. No need to send this command.
Command: SYST
Response: 215 UNIX emulated by FileZilla
Status: Listing parser set to: Machine
# SetWorkingDirectory("OUT")
Command: CWD OUT
Response: 250 CWD successful. "/OUT" is current directory.
# GetListing(null, Auto)
Command: PWD
Response: 257 "/OUT" is current directory.
Command: TYPE I
Response: 200 Type set to I
# OpenPassiveDataStream(PASV, "MLSD /OUT", 0)
Command: PASV
Response: 227 Entering Passive Mode (94,186,230,134,55,109)
Status: Connecting to ***:14189
Command: MLSD /OUT
Response: 150 Opening data channel for directory listing of "/OUT"
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 92 (2 by maintainers)
Ok I have an update for you. I’ve installed the aforementioned version of Filezilla in a Sandbox, only modified the host and see what I get in the server logs (I also enforced FTP over TLS):
Interestingly, we both try to connect against the same version of Filezilla - 0.9.60 beta.
i hope this helps:
For what I found, a windows update introduced in late 2020 led to the problems and the only way to fix it is to uninstall the update doh
Ok, first of thanks incredibly much for your help in this. Awesome results - one could now bisect to find from which version onwards does this not-work/work.
But first, here is another comment:
Given the slightly client-unfriendly reactions of the filezilla-server owner(s) concerning making things work with clients where there were difficulties in the past, we could ourselves say: Looks like someone should update their 5 year old filezilla server.
In this industry a typical reaction could then be: Then this is not our problem. Update the server. Period.
The FluentFTP teams reaction, though, is: As long as others (like you guys, @codengine and @noxe, in this case) are helping us to somehow diagnose this further until we can definitely say that it can’t be solved, we are always ready to investigate this further.
But let’s also always keep in mind that all open issues carry their own priorities, based on the number of affected users and also the comparitive effort needed to work on this, compared to other planned efforts to improve FluentFTP.
Being able to reproduce this is a huge step forward and so this will be investigated further. But please do not be dissapointed if in the end, there might not be any workaround. We will see.
No, this will take a little longer. I will report when I know more and I have another branch to test.
Well, we have learned something (offline): it works when its not .NET 6 - if you use .NET Framework 4.8, no error.
@robinrodricks So now that is at least a little clue as to where to start looking.