0 votes
by (260 points)

We're using Rebex FTP component in our .NET application or many years but I'm first time encountering such a problem.

One of our users is getting FtpException with "Invalid FTP response (A)" message. Communication log:

State changed from Disconnected to Connecting
State changed from Connecting to Reading
Response read: 220-Welcome to the Shutterstock FTP site.
Response read: 
Response read: Please login with the email address and password you created when you 
Response read: joined the Shutterstock Submit program at http://submit.shutterstock.com.
Response read: 
Response read: After you upload a file via FTP, it will be moved within a few minutes from
Response read: the uploaded directory and placed where it can be accessed via the
Response read: Shutterstock Submit web site. To complete the submission process, please
Response read: go to the web site, click the 'FTP Uploads' link, and enter the required
Response read: information for each photo.
Response read: 
Response read: NOTE:
Response read: 
Response read: - filenames may contain only alphanumeric characters (A-Z, a-z, 0-9),
Response read: spaces, commas, hyphens, periods, @ signs, and underlines.
Response read: 
Response read: - files must be under 4GB. Larger files will be rejected with a "426
Response read: Operation Not Permitted" error.
Response read: 220 Shutterstock FTP Site
State changed from Reading to Ready
State changed from Ready to Sending
Command sent: USER foo@gmail.com
State changed from Sending to Reading
Response read: 331 Password required for foo@gmail.com
State changed from Reading to Processing
State changed from Processing to Sending
Command sent: PASS ********
State changed from Sending to Reading
Response read: 230 User foo@gmail.com logged in
State changed from Reading to Ready
State changed from Ready to Sending
Command sent: FEAT
State changed from Sending to Reading
Response read: 211-Features:
Response read: MFF modify;UNIX.group;UNIX.mode;
Response read: REST STREAM
Response read: MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
Response read: UTF8
Response read: EPRT
Response read: EPSV
Response read: LANG ja-JP;it-IT;ko-KR;es-ES;bg-BG;en-US;ru-RU;zh-TW;zh-CN;fr-FR
Response read: MDTM
Response read: TVFS
Response read: MFMT
Response read: SIZE
Response read: 211 End
State changed from Reading to Ready
State changed from Ready to Sending
Command sent: OPTS UTF8 ON
State changed from Sending to Reading
Response read: 200 UTF8 set to on
State changed from Reading to Ready
State changed from Ready to Sending
Command sent: OPTS MLST modify;perm;size;type;UNIX.group;UNIX.mode;UNIX.owner;
State changed from Sending to Reading
Response read: 550 MLST modify;perm;size;type;UNIX.group;UNIX.mode;UNIX.owner;: Forbidden command argument
State changed from Reading to Ready
State changed from Ready to Sending
Command sent: CWD /
State changed from Sending to Reading
Response read: 250 CWD command successful
State changed from Reading to Ready
State changed from Ready to Sending
Command sent: CWD /
State changed from Sending to Reading
Response read: 250 CWD command successful
State changed from Reading to Ready
State changed from Ready to Sending
Command sent: TYPE A
State changed from Sending to Reading
Response read: 200 Type set to A
State changed from Reading to Ready
State changed from Ready to Sending
Command sent: PASV
State changed from Sending to Reading
Response read: 227 Entering Passive Mode (162,212,41,42,219,81)
State changed from Reading to Ready
State changed from Ready to Sending
Command sent: MLSD
State changed from Sending to Reading
Response read: 150 Opening ASCII mode data connection for MLSD

Rebex.Net.FtpException (Invalid FTP response (A).)
0: - Void StockSubmitter.App.<Application_Startup>b__0(System.Object, System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
0: - Rebex.Net.FtpResponse Rebex.Net.RFX.JD(Int32)
0: - Rebex.Net.FtpResponse Rebex.Net.Ftp.ME(Int32, Boolean)
0: - Void Rebex.Net.Ftp.DQ(System.String, Boolean, Rebex.Net.GJX, Rebex.APX, Int64, Rebex.Net.FtpTransferState)
0: - Int64 Rebex.Net.Ftp.VN(System.String, Boolean, System.IO.Stream, Int64, System.String, Rebex.APX)
0: - Rebex.Net.FtpItemCollection Rebex.Net.Ftp.DU(System.String, Rebex.APX)
0: - System.Object Rebex.Net.Ftp.ML(System.Object, System.Enum, System.Object[])
0: - Void Rebex.XFX.YY(System.Object)
0: - Void System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
0: - Void System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
0: - Void System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
0: - Boolean System.Threading.ThreadPoolWorkQueue.Dispatch()

I don't know how to debug this issue :(

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (70.2k points)

Hello,

the log is created using old logging approach. Unfortunatelly, the error occurred before it was logged. In the current version Ftp object has the LogWriter property, which improves logging a lot.

However, the issue is not caused by the logger, but the unexpected response from the server. Can you please try the latest version to ensure the problem is not fixed already.

You can either download current version in your project or use the FtpWinFormClient sample against your FTP server.

If the problem still exists in the current version, please post here the Debug log of the communication (or send it to support@rebex.net).

...