Page 1 of 1

File xfers sucessfully, disconnects, then starts xfer again

Posted: Tue Nov 17, 2009 9:34 pm
by slwhitman
I am having a strange issue when transferring certain files. The client is SyncBack by 2BrightSparks. It executes a script to sync files. The server is Win XP Home running Cerberus. The client connection is active FTP. Most file transfers execute without a problem, but certain files will connect, transfer, complete transfer and then disconnect with the warning Closing connection: An existing connection was forcibly closed by the remote host. (see log below) this will go on for the same file a couple hundred times (see log excerpts for two cycles) and then it ends and moves on to the next file.

Router is a Belkin F5D2631-4, Ports 21 and Ports 11000 -13000 are open.
Cerberus can recognize the WAN IP, which is static, but I am usig DynDNS to map to a vanity URL to the WAN IP.


[2009-11-17 13:03:10]: REPLY [ 354] - 331 User bill, password please

[2009-11-17 13:03:10]:COMMAND [ 354] - PASS ***********
[2009-11-17 13:03:10]: REPLY [ 354] - 230 Password Ok, User logged in

[2009-11-17 13:03:10]:COMMAND [ 354] - TYPE I
[2009-11-17 13:03:10]: REPLY [ 354] - 200 Type Binary

[2009-11-17 13:03:10]:COMMAND [ 354] - SYST
[2009-11-17 13:03:10]: REPLY [ 354] - 215 UNIX Type: L8

[2009-11-17 13:03:10]:COMMAND [ 354] - CWD /root/dir/
[2009-11-17 13:03:10]: REPLY [ 354] - 250 Change directory ok

[2009-11-17 13:03:10]:COMMAND [ 354] - PORT X,X,X,X,16,106
[2009-11-17 13:03:10]: REPLY [ 354] - 200 Port command received

[2009-11-17 13:03:10]:COMMAND [ 354] - STOR FILE.QBW
[2009-11-17 13:03:10]: REPLY [ 354] - 150 Opening data connection

[2009-11-17 13:13:24]: SYSTEM [ 354] - File transfer complete
[2009-11-17 13:13:24]: REPLY [ 354] - 226 Transfer complete

[2009-11-17 13:14:24]: WARN [ 354] - Closing connection: An existing connection was forcibly closed by the remote host.

[2009-11-17 13:14:24]:CONNECT [ 354] - Connection terminated.
[2009-11-17 13:14:27]:CONNECT [ 355] - Incoming connection request on interface yy.yy.yy.yy Server IP
[2009-11-17 13:14:27]:CONNECT [ 355] - Connection request accepted from XX.XX.XX.XX Clinet IP
[2009-11-17 13:14:27]:COMMAND [ 355] - USER bill
[2009-11-17 13:14:27]: REPLY [ 355] - 331 User bill, password please

[2009-11-17 13:14:27]:COMMAND [ 355] - PASS ***********
[2009-11-17 13:14:27]: REPLY [ 355] - 230 Password Ok, User logged in

[2009-11-17 13:14:27]:COMMAND [ 355] - TYPE I
[2009-11-17 13:14:27]: REPLY [ 355] - 200 Type Binary

[2009-11-17 13:14:27]:COMMAND [ 355] - SYST
[2009-11-17 13:14:27]: REPLY [ 355] - 215 UNIX Type: L8

[2009-11-17 13:14:27]:COMMAND [ 355] - CWD /root/dir/
[2009-11-17 13:14:27]: REPLY [ 355] - 250 Change directory ok

[2009-11-17 13:14:27]:COMMAND [ 355] - PORT X,X,X,X,16,109
[2009-11-17 13:14:27]: REPLY [ 355] - 200 Port command received

[2009-11-17 13:14:27]:COMMAND [ 355] - STOR FILE.QBW
[2009-11-17 13:14:27]: REPLY [ 355] - 150 Opening data connection

[2009-11-17 13:16:23]: SYSTEM [ 355] - File transfer complete
[2009-11-17 13:16:23]: REPLY [ 355] - 226 Transfer complete

[2009-11-17 13:16:23]:COMMAND [ 355] - PORT X,X,X,X,16,110
[2009-11-17 13:16:23]: REPLY [ 355] - 200 Port command received

[2009-11-17 13:16:23]:COMMAND [ 355] - PORT X,X,X,X,16,111
[2009-11-17 13:16:23]: REPLY [ 355] - 200 Port command received

[2009-11-17 13:16:23]:COMMAND [ 355] - STOR FILE.QBW.ND
[2009-11-17 13:16:42]: ERROR [ 355] - Unable to connect : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

[2009-11-17 13:16:42]:SUGGEST [ 355] - For help see http://www.cerberusftp.com/faq/initialsetup.htm#Q3
[2009-11-17 13:16:42]: REPLY [ 355] - 425 Unable to open the data connection

Re: File xfers sucessfully, disconnects, then starts xfer again

Posted: Wed Nov 18, 2009 4:53 pm
by Serin
Hello,

These two lines are very strange:


[2009-11-17 13:16:23]:COMMAND [ 355] - PORT X,X,X,X,16,110
[2009-11-17 13:16:23]: REPLY [ 355] - 200 Port command received

[2009-11-17 13:16:23]:COMMAND [ 355] - PORT X,X,X,X,16,111
[2009-11-17 13:16:23]: REPLY [ 355] - 200 Port command received

I've never seen an FTP client issue two port commands back-to-back. My guess is that the client is issuing the first PORT command and then when it tries to open up the port the operation fails. Then it issues another port command trying to open the next port. Just a guess though. I would need to see the FTP client log to be sure.

Ignoring the strangeness, the error from Cerberus simply means Cerberus can't connect to the machine and port specified in the PORT command. One possibility is that the client hits a range of ports that aren't mapped through their firewall or are in-use on their local machine. For active FTP, Cerberus is trying to connect to the machine that issues the PORT command. The problem is most likely on the client end (the client is unable to listen on the specified port or the port is not accessible externally).

Can you use passive FTP?

Re: File xfers sucessfully, disconnects, then starts xfer again

Posted: Mon Nov 30, 2009 2:19 pm
by slwhitman
I think the dual PORT command was an abboration, I looked back at the log files and did not see this occur at any other point in time. It may have even been caused by a cut and past error on my part. If you igrnore the last eight log entries in what I posted you can see the problem happening above without the dual PORT command.

The file transfers sucessfully and the client issues a MTDM command. The command is not logged by Cerberus and the host forcibly disconnects, Client doesn't get final confirmation that files was received and kicks off the Login and transmission process again. This only seems happens with this one file, which is a .QBW File (Quick Books Windows) and happens to be quite large, 28 Mb. All other file transfers usually work.

Re: File xfers sucessfully, disconnects, then starts xfer again

Posted: Tue Dec 01, 2009 3:51 am
by mdj
What catches my eye is that the first upload shown takes almost exactly 10 minutes, and that rings a bell. I have a "smart" router myself, that will cut tcp lines that have been idle for 10 minutes, and during upload of large files, the ftp control line is indeed idle. Not all ftp software can handle that the control line is cut (I believe Cerberus can though), so you could possibly try with another client, or simply try to verify the theory by timing an idle connection through the router(s) involved.

Re: File xfers sucessfully, disconnects, then starts xfer again

Posted: Tue Dec 01, 2009 9:55 pm
by slwhitman
Exactly, consistently 10:19 between executions. Now how would I go about timing a idle connection through the router and then disabling or extending the timeout?

I don't really have a choice of changing client apps, (SyncBack fits my needs perfectly - excepting this glitch) unless you have a recomendation for a good automated solution for syncing two servers?

Re: File xfers sucessfully, disconnects, then starts xfer again

Posted: Wed Dec 02, 2009 10:54 am
by mdj
No suggestions, really... In my own router there is no changing that timeout, so - learn to live with it. Another option is to cut the file in smaller pieces, and reassemble it again on the other side...