Old 06-26-2004, 05:11 PM   #1
cerda
Junior Member
 
Join Date: Jun 2004
Posts: 4
Default REST & RETR Error

I've tried your FTP client, but found out some error, caused problably by combination of FTP client and FTP server.
When transfer drops for some reason, then resume of 15 MB file works in this way:

REST 9522120
RETR myarchive.003

next file is transferred in this way:

RETR myarchive.004

but due combination of client and server, transfer of myarchive.004 starts as it was REST, ie. the final file size is not 15.000.000 B, but 5477880 B (15.000.000 - 9.522.120)
and all the next files are that wrong size ...
the solution on FTP client side is to call FTP command which resets the REST position ...
but in your client there is no option to set command executed before REST or RETR command
some FTP clients for example CuteFTP can handle mentioned problem ...

btw. the problem is probably FlashFXP version independent, I've tried version 2.1 (924) either
--------------------
* FlashFXP v[3].[0], build [1003], [ ]registered, [x]unregistered, [ ]pirated
* OS [x] WinXP, [ ] Win2K, [ ] Win98, [ ] WinME, [ ] Other
* Running behind NAT/router [ ] Yes & Model [ ], [ ] No, [x] Not sure
* Running firewall [ ] Yes, Name [ ], Ver. [ ], or [x] No
* Running Antivirus [ ] Yes, Name [ ] or [x] No
* Network [ ] xDSL, [ ] CABLE, [ ] Dail-Up, [x] Other
cerda is offline  
Old 06-26-2004, 05:16 PM   #2
MxxCon
Super Duper
FlashFXP Beta Tester
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 3,881
Default

we need to see more complete status log, also need to know what FTPD you are connecting to.
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]
MxxCon is offline  
Old 06-26-2004, 05:58 PM   #3
cerda
Junior Member
 
Join Date: Jun 2004
Posts: 4
Default

the server should be GlobalScape SecureFTP Server 2.0
here is the log:

FlashFXP v3.0 build 1003 [PUBLIC PREVIEW] RC 3
Online support forums http://forum.flashfxp.com


WinSock 2.0 -- OpenSSL 0.9.7d 17 Mar 2004
[R] Connecting to ABC -> IP=x.x.x.x PORT=1212
[R] Connected to ABC
[R] 220 K FTP
[R] AUTH TLS
[R] 234 AUTH Command OK. Initializing SSL connection.
[R] Connected. Negotiating TLSv1 session..
[R] TLSv1 negotiation successful...
[R] TLSv1 encrypted session using cipher AES256-SHA (256 bits)
[R] PBSZ 0
[R] 200 PBSZ Command OK. Protection buffer size set to 0.
[R] USER ABCUser
[R] 331 Password required for ABCUser.
[R] PASS (hidden)
[R] 230-Login OK. Proceed.
[R] SYST
[R] 215 UNIX Type: L8
[R] FEAT
[R] 211-Features supported:
[R] COMB target;source_list
[R] REST STREAM
[R] SIZE
[R] MDTM
[R] XCRC filename;start;end
[R] SSCN
[R] MLST Size*;Modify*;Create;Type*;Unique;Perm*;Lang;Media-Type;CharSet;
[R] 211 END
[R] PWD
[R] 257 "/" is current folder.
[R] TYPE A
[R] 200 Type set to A.
[R] PROT P
[R] 200 PROT Command OK. Using Private data connection
.
.
.
[R] TYPE I
[R] 200 Type set to I.
[R] PASV
[R] 227 Entering Passive Mode (x,x,x,x,100,159).
[R] Opening data connection IP: x.x.x.x PORT: 25759
[R] RETR file01.zip
[R] Connected. Negotiating TLSv1 session..
[R] 150 Opening BINARY mode data connection for file01.zip.
[R] TLSv1 negotiation successful...
[R] TLSv1 encrypted session using cipher AES256-SHA (256 bits)
(soft abort)
[R] ABOR
[R] 226 ABOR command successful.
[R] 552 Requested file action aborted.
[R] Transfer Failed!
User Aborted
[R] PASV
[R] 227 Entering Passive Mode (x,x,x,x,100,160).
[R] Opening data connection IP: x.x.x.x PORT: 25760
[R] REST 2062336
[R] 350 restarting at 2062336 - send STOR or RETR to initiate transfer.
[R] RETR file01.zip
[R] Connected. Negotiating TLSv1 session..
[R] 150 Opening BINARY mode data connection for file01.zip.
[R] TLSv1 negotiation successful...
[R] TLSv1 encrypted session using cipher AES256-SHA (256 bits)
[R] 226 Transfer complete. 2885860 bytes transferred. 131175 bps.
-- file01.zip size was 2.75 MB
[R] TYPE I
[R] 200 Type set to I.
[R] PASV
[R] 227 Entering Passive Mode (x,x,x,x,100,170).
[R] Opening data connection IP: x.x.x.x PORT: 25770
[R] RETR file02.zip
[R] Connected. Negotiating TLSv1 session..
[R] 150 Opening BINARY mode data connection for file02.zip.
[R] TLSv1 negotiation successful...
[R] TLSv1 encrypted session using cipher AES256-SHA (256 bits)
[R] 226 Transfer complete. 3984703 bytes transferred. 63249 bps.
Transferred: file02.zip 1,85 MB in 1 minutes 4 seconds (29,5 KB/s)
-- file02.zip size was 3.82 MB, but as you can see transferred was only last 1.85 MB of file02.zip
[R] PASV
[R] 227 Entering Passive Mode (x,x,x,x,100,171).
[R] Opening data connection IP: x.x.x.x PORT: 25771
[R] RETR file03.zip
[R] Connected. Negotiating TLSv1 session..
[R] 150 Opening BINARY mode data connection for file03.zip.
[R] TLSv1 negotiation successful...
[R] TLSv1 encrypted session using cipher AES256-SHA (256 bits)
[R] 226 Transfer complete. 3984703 bytes transferred. 58598 bps.
-- file03.zip size was 3.82 MB, but as you can see transferred was only last 1.85 MB of file32.zip
cerda is offline  
Old 06-26-2004, 06:19 PM   #4
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

This is really strange, based on the ftp session log I don't see anything out of the ordinary. I will look into this.

I question the accuracy of the ftp server and wonder if it's corrupted or a buggy release.

On a side note please upgrade to v3.0 RC4
bigstar is offline  
Old 06-26-2004, 06:43 PM   #5
cerda
Junior Member
 
Join Date: Jun 2004
Posts: 4
Default

Here is CuteFTP log for the same actions:

COMMAND:> [27.6.2004 1:40:11] TYPE I
[27.6.2004 1:40:11] 200 Type set to I.
COMMAND:> [27.6.2004 1:40:11] PBSZ 0
[27.6.2004 1:40:11] 200 PBSZ Command OK. Protection buffer size set to 0.
COMMAND:> [27.6.2004 1:40:11] PROT P
[27.6.2004 1:40:11] 200 PROT Command OK. Using Private data connection
COMMAND:> [27.6.2004 1:40:11] PASV
[27.6.2004 1:40:11] 227 Entering Passive Mode (x,x,x,x,100,197).
COMMAND:> [27.6.2004 1:40:11] REST 0
[27.6.2004 1:40:11] 350 restarting at 0 - send STOR or RETR to initiate transfer.
COMMAND:> [27.6.2004 1:40:11] RETR file01.zip
STATUS:> [27.6.2004 1:40:11] Connecting FTP data socket x.x.x.x:25797...
[27.6.2004 1:40:12] 150 Opening BINARY mode data connection for file01.zip.
STATUS:> [27.6.2004 1:40:12] Connected. Exchanging encryption keys...
STATUS:> [27.6.2004 1:40:12] SSL Connect time: 62 ms.
STATUS:> [27.6.2004 1:40:12] SSL encrypted session established.
COMMAND:> [27.6.2004 1:41:34] ABOR
[27.6.2004 1:41:34] 226 ABOR command successful.
[27.6.2004 1:41:34] 552 Requested file action aborted.
STATUS:> [27.6.2004 1:41:46] Current file size 2506752, restarting 50000 bytes.
COMMAND:> [27.6.2004 1:41:46] PASV
[27.6.2004 1:41:46] 227 Entering Passive Mode (x,x,x,x,100,198).
COMMAND:> [27.6.2004 1:41:46] REST 2456752
[27.6.2004 1:41:46] 350 restarting at 2456752 - send STOR or RETR to initiate transfer.
COMMAND:> [27.6.2004 1:41:46] RETR file01.zip
STATUS:> [27.6.2004 1:41:46] Connecting FTP data socket x.x.x.x:25798...
[27.6.2004 1:41:46] 150 Opening BINARY mode data connection for file01.zip.
STATUS:> [27.6.2004 1:41:46] Connected. Exchanging encryption keys...
STATUS:> [27.6.2004 1:41:46] SSL Connect time: 62 ms.
STATUS:> [27.6.2004 1:41:46] SSL encrypted session established.
[27.6.2004 1:42:02] 226 Transfer complete. 2867536 bytes transferred. 191169 bps.
COMMAND:> [27.6.2004 1:42:02] PASV
[27.6.2004 1:42:02] 227 Entering Passive Mode (x,x,x,x,100,199).
COMMAND:> [27.6.2004 1:42:02] REST 0
[27.6.2004 1:42:02] 350 restarting at 0 - send STOR or RETR to initiate transfer.
COMMAND:> [27.6.2004 1:42:02] RETR file02.zip
STATUS:> [27.6.2004 1:42:02] Connecting FTP data socket x.x.x.x:25799...
[27.6.2004 1:42:02] 150 Opening BINARY mode data connection for file02.zip.
STATUS:> [27.6.2004 1:42:02] Connected. Exchanging encryption keys...
STATUS:> [27.6.2004 1:42:02] SSL Connect time: 78 ms.
STATUS:> [27.6.2004 1:42:02] SSL encrypted session established.
[27.6.2004 1:44:20] 226 Transfer complete. 4014527 bytes transferred. 28881 bps.
COMMAND:> [27.6.2004 1:44:20] PASV
[27.6.2004 1:44:20] 227 Entering Passive Mode (x,x,x,x,100,200).
COMMAND:> [27.6.2004 1:44:20] RETR file03.zip
STATUS:> [27.6.2004 1:44:20] Connecting FTP data socket x.x.x.x:25800...
[27.6.2004 1:44:20] 150 Opening BINARY mode data connection for file03.zip.
STATUS:> [27.6.2004 1:44:20] Connected. Exchanging encryption keys...
STATUS:> [27.6.2004 1:44:20] SSL Connect time: 78 ms.
STATUS:> [27.6.2004 1:44:20] SSL encrypted session established.
[27.6.2004 1:46:34] 226 Transfer complete. 4014527 bytes transferred. 29959 bps.
----
so it seems to be missing REST 0 in FlashFXP file retrieval commands
cerda is offline  
Old 06-26-2004, 10:06 PM   #6
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

I doubt a rest 0 is required by the ftp protocol.
I think a rest is supposed to only apply to the next retr.
Mouton is offline  
Old 06-27-2004, 12:46 AM   #7
cerda
Junior Member
 
Join Date: Jun 2004
Posts: 4
Default

Send REST 0 before transfering new file should be an option in Site definition.

As I checked, RFC (959, 114, ...) is unclear about REST 0.
cerda is offline  
Old 06-27-2004, 07:43 AM   #8
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

RFC 959 explains the procedure to restart a failed transfer, and it clearly states that you need to send a REST command just before you send a APPE/STOR/RETR command. The state diagram in section 6 shows that.
A REST command thus only apply to the next APPE/STOR/RETR sent.
If your server doesn't do that, it's probably a bug in their implementation.
Mouton is offline  
 

Tags
client, flashfxp, ftp, rest, [x]

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:22 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)