RETR command has prefixed carriage return, causing failure.

I've been having an interesting difficulty with SmartFTP 1.1.984. It's running on Windows XP Pro, SP2. It is transferring files from my computer, which is running the Ceberus FTP Server on Windows XP Pro, SP2.

At this moment, I only have access to the Ceberus logs. I hope to get access to the SmartFTP logs soon. But I think you can see the problem from the server-side logs:

Fri Mar 18 17:21:43 2005 Vendor: AuthenticAMD
Fri Mar 18 17:21:43 2005 CPU: AMD ATHLON
Fri Mar 18 17:21:43 2005 Number of Processors: 1
Fri Mar 18 17:21:43 2005 Operating System: Microsoft Windows XP Professional
Fri Mar 18 17:21:43 2005 Additional Info: Service Pack 2 (Build 2600)

Fri Mar 18 17:21:43 2005 Cerberus FTP Server started
Fri Mar 18 17:21:43 2005 Local Host: boofus


Fri Mar 18 17:21:43 2005 Local Interface 1 located at 192.168.1.120
Fri Mar 18 17:21:43 2005 Listening on Port 21

Fri Mar 18 17:22:06 2005 0 Incoming connection request on interface 192.168.1.120
Fri Mar 18 17:22:06 2005 0 Connection request accepted from 24.61.40.201
Fri Mar 18 17:22:06 2005 0 USER Sallie Mae
Fri Mar 18 17:22:06 2005 0 331 User Sallie Mae, password please
Fri Mar 18 17:22:06 2005 0 PASS ***********
Fri Mar 18 17:22:06 2005 0 230 Password Ok, User logged in
Fri Mar 18 17:22:06 2005 0 SYST
Fri Mar 18 17:22:06 2005 0 215 UNIX Type: L8
Fri Mar 18 17:22:06 2005 0 FEAT
Fri Mar 18 17:22:06 2005 0 211- Additional features supported include:
Fri Mar 18 17:22:07 2005 0 TYPE I
Fri Mar 18 17:22:07 2005 0 200 Type Binary
Fri Mar 18 17:22:07 2005 0 REST 0
Fri Mar 18 17:22:07 2005 0 350 Restarting at byte offset 0. Send STOR or RETR to initiate transfer
Fri Mar 18 17:22:07 2005 0 PWD
Fri Mar 18 17:22:07 2005 0 257 "/" is the current directory
Fri Mar 18 17:22:07 2005 0 CWD /For Sallie
Fri Mar 18 17:22:07 2005 0 250 Change directory ok
Fri Mar 18 17:22:07 2005 0 PWD
Fri Mar 18 17:22:07 2005 0 257 "/For Sallie" is the current directory
Fri Mar 18 17:22:07 2005 0 PASV
Fri Mar 18 17:22:07 2005 0 227 Entering Passive Mode (65,79,22,31,4,2)
Fri Mar 18 17:22:28 2005 0 PORT 24,62,43,205,217,92
Fri Mar 18 17:22:28 2005 0 200 Port command received
Fri Mar 18 17:22:28 2005 0
RETR Horn Sonata - Beethoven Sonate in F.mp3
Fri Mar 18 17:22:28 2005 0 502 Unrecognized or unsupported command
Fri Mar 18 17:22:28 2005 0 Error closing connection: An established connection was aborted by the software in your host machine.


Fri Mar 18 17:22:28 2005 0 Connection terminated.
Fri Mar 18 17:22:57 2005 1 Incoming connection request on interface 192.168.1.120
Fri Mar 18 17:22:57 2005 1 Connection request accepted from 24.61.40.201
Fri Mar 18 17:22:57 2005 1 USER Sallie Mae
Fri Mar 18 17:22:57 2005 1 331 User Sallie Mae, password please
Fri Mar 18 17:22:57 2005 1 PASS ***********
Fri Mar 18 17:22:57 2005 1 230 Password Ok, User logged in
Fri Mar 18 17:22:57 2005 1 SYST
Fri Mar 18 17:22:57 2005 1 215 UNIX Type: L8
Fri Mar 18 17:22:57 2005 1 FEAT
Fri Mar 18 17:22:57 2005 1 211- Additional features supported include:
Fri Mar 18 17:22:57 2005 1 TYPE I
Fri Mar 18 17:22:57 2005 1 200 Type Binary
Fri Mar 18 17:22:58 2005 1 REST 0
Fri Mar 18 17:22:58 2005 1 350 Restarting at byte offset 0. Send STOR or RETR to initiate transfer
Fri Mar 18 17:22:58 2005 1 PWD
Fri Mar 18 17:22:58 2005 1 257 "/" is the current directory
Fri Mar 18 17:22:58 2005 1 CWD /For Sallie
Fri Mar 18 17:22:58 2005 1 250 Change directory ok
Fri Mar 18 17:22:58 2005 1 PWD
Fri Mar 18 17:22:58 2005 1 257 "/For Sallie" is the current directory
Fri Mar 18 17:22:58 2005 1 PASV
Fri Mar 18 17:22:58 2005 1 227 Entering Passive Mode (65,79,22,31,4,3)
Fri Mar 18 17:23:19 2005 1 PORT 24,62,43,205,218,83
Fri Mar 18 17:23:19 2005 1 200 Port command received
Fri Mar 18 17:23:19 2005 1
RETR Ian Bostridge, Tenor & Britten Symphonia cond. Daniel Harding - Serenade for tenor, horn and strings op. 31 - Hymn.mp3
Fri Mar 18 17:23:19 2005 1 502 Unrecognized or unsupported command





As you can see from the logs, there appears to be a carriage return sent by the SmartFTP client to Ceberus server before every RETR command. It places the command onto a different line in the log, and creates a square character-not-accepted symbol in the on-screen log. This seems to be causing the difficulty, for when I try the last file with an ftp client on the same machine as the server I get:





Fri Mar 18 17:44:57 2005 28 Incoming connection request on interface 192.168.1.120
Fri Mar 18 17:44:57 2005 28 Connection request accepted from 65.78.25.41
Fri Mar 18 17:44:57 2005 28 USER Sallie Mae
Fri Mar 18 17:44:57 2005 28 331 User Sallie Mae, password please
Fri Mar 18 17:44:57 2005 28 PASS ***********
Fri Mar 18 17:44:57 2005 28 230 Password Ok, User logged in
Fri Mar 18 17:44:57 2005 28 SYST
Fri Mar 18 17:44:57 2005 28 215 UNIX Type: L8
Fri Mar 18 17:44:57 2005 28 FEAT
Fri Mar 18 17:44:57 2005 28 211- Additional features supported include:
Fri Mar 18 17:44:57 2005 28 TYPE I
Fri Mar 18 17:44:57 2005 28 200 Type Binary
Fri Mar 18 17:44:57 2005 28 REST 0
Fri Mar 18 17:44:57 2005 28 350 Restarting at byte offset 0. Send STOR or RETR to initiate transfer
Fri Mar 18 17:44:57 2005 28 PWD
Fri Mar 18 17:44:57 2005 28 257 "/" is the current directory
Fri Mar 18 17:44:57 2005 28 CWD /For Sallie
Fri Mar 18 17:44:57 2005 28 250 Change directory ok
Fri Mar 18 17:44:57 2005 28 PWD
Fri Mar 18 17:44:57 2005 28 257 "/For Sallie" is the current directory
Fri Mar 18 17:44:57 2005 28 PASV
Fri Mar 18 17:44:57 2005 28 227 Entering Passive Mode (65,78,25,41,4,30)
Fri Mar 18 17:45:18 2005 28 PORT 65,79,22,31,248,241
Fri Mar 18 17:45:18 2005 28 200 Port command received
Fri Mar 18 17:45:18 2005 28 RETR Ian Bostridge, Tenor & Britten Symphonia cond. Daniel Harding - Serenade for tenor, horn and strings op. 31 - Hymn.mp3
Fri Mar 18 17:45:18 2005 28 Data connection established
Fri Mar 18 17:45:18 2005 28 150 Opening data connection
Fri Mar 18 17:45:19 2005 28 File transfer complete
Fri Mar 18 17:45:19 2005 28 The data connection was closed by the remote socket
Fri Mar 18 17:45:19 2005 28 226 Transfer complete
Fri Mar 18 17:45:19 2005 28 QUIT
Fri Mar 18 17:45:19 2005 28 Error closing connection: An established connection was aborted by the software in your host machine.


Fri Mar 18 17:45:19 2005 28 Connection terminated.


As you can see, the RETR command is on one line with its timestamp, and the file transfers fine. This seems to be a degradation of the performance of the other client: it downloaded over 100 files, but gradually started prefixing this carriage return in the request for files. Now it's every file requested, so the transfer of files has ceased. I rebooted the Ceberus server, but that didn't change anything. I currently can't restart the troublesome client until later tonight, to see if that temporarily clears up the problem.

All of the files being transferred are placed on our global queues - SmartFTP is transferring them at its leisure. Oh, and there are a large quantity of files, many are in subdirectories, and most have spaces in their names, if that makes any difference.

Has anyone else run into this?

Thanks in advance.

I have just restarted the SmartFTP client, and the problem continues in the global queue upon restart.

It also seems that there was a "LIST -aL" command that had a carriage return before it ... but only once. I think it was associated with the browser portion of the SmartFTP client.

And now, out of the blue, a RETR command occurs without the prefixed carriage return. It is one of the entries in the global queue. There is nothing special about the filename that I can see - it's not shorter than any others, nor does it not have spaces, and both successful and unsuccessful filenames start with the character "0".

Just as a follow-up, most of this problem seems to have been solved when I rebooted my router. I had opened up 10 ports for passive ftp, but the changes hadn't taken. I was able to successfully transfer the rest of the files after that.

Since I don't know how to reproduce the problem well anymore, this is effectively a closed issue for me.