The server has closed the connection.

0 votes
asked Apr 15 by Ivan (280 points)

Hi.

One of our customers received an error message during the uploading:

     The server has closed the connection.

Customer uploads files to another FTP client successfully.

Customer provides with a test access:
host ftp-r1-it.storage.cloud.it
port 21
login: --removed--
password: --removed--
folder: server-backup

We try to upload a file via Rebex test ftp client, and gat the same error.

Rebex.Ftp.dll - 4.0.6426.0

Any ideas?

Applies to: Rebex FTP/SSL

1 Answer

+1 vote
answered Apr 16 by Lukas Matyska (52,510 points)
selected Apr 26 by Ivan
 
Best answer

It seems that server behaves incorrectly. It features MLST command, but when used, it closes the connection. Please, check the log:

Ftp(1)[1] Command: FEAT
Ftp(1)[1] Response: 211-Features supported:
Ftp(1)[1] Response:  AUTH SSL
Ftp(1)[1] Response:  AUTH TLS
Ftp(1)[1] Response:  EPRT
Ftp(1)[1] Response:  EPSV
Ftp(1)[1] Response:  MDTM
Ftp(1)[1] Response:  MFMT
Ftp(1)[1] Response:  MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;
Ftp(1)[1] Response:  PBSZ
Ftp(1)[1] Response:  PROT
Ftp(1)[1] Response:  REST STREAM
Ftp(1)[1] Response:  SIZE
Ftp(1)[1] Response:  TVFS
Ftp(1)[1] Response:  UTF8
Ftp(1)[1] Response: 211 End FEAT.

When the client try to use MLST command:

Ftp(1)[1] Command: MLST Ftp
Ftp(1)[1] Info: Control connection closed.
Ftp(1)[1] Info: Rebex.Net.FtpException: The server has closed the connection.

The correct solution is to report this to server vendor.

In the meantime, you can workaround this issue by disabling MLST on client like this:

var client = new Ftp();
client.EnabledExtensions &= ~FtpExtensions.MachineProcessingList;

In VB.NET like this:

Dim client As New Ftp()
client.EnabledExtensions = client.EnabledExtensions And Not FtpExtensions.MachineProcessingList
...