Topic: 0kb size after uploading files to ftp

Could you please help with the following problem. I'm trying to upload several files into my project repository with ftp. But after uploading some of my files becomes zero-size. I have tried several ftp-clients (Windows Explorer, Ant 1.8.1, Built-in client in Unreal Commander).

I can give more information (send the problem files, give full system description, etc.) if needed.

For example, here are logs from the ant script session that deletes file in dir, removes all dirs in it and tries to push files:

publish-to-ftp:
     [echo] Publish trunk update site
      [ftp] deleting files
      [ftp] deleting features\eclihx.feature_0.2.0.201101071745.jar
      [ftp] 1 files deleted
      [ftp] removing directories
      [ftp] removing features
      [ftp] 1 directories removed
      [ftp] sending files
      [ftp] transferring c:\Users\goodwin\workspace-eclihx\eclihx\updates\.project
      [ftp] transferring c:\Users\goodwin\workspace-eclihx\eclihx\updates\artifacts.jar
      [ftp] transferring c:\Users\goodwin\workspace-eclihx\eclihx\updates\content.jar
      [ftp] transferring c:\Users\goodwin\workspace-eclihx\eclihx\updates\features\eclihx.feature_0.2.0.201101071745.jar
      [ftp] transferring c:\Users\goodwin\workspace-eclihx\eclihx\updates\plugins\eclihx.core_0.2.0.201101071745.jar
      [ftp] try #1: IO error (plugins\eclihx.core_0.2.0.201101071745.jar), number of maximum retries reached (0), giving up

artifacts.jar is 690b and it's ok
content.jar is 6728b and it's 0b on ftp.

Re: 0kb size after uploading files to ftp

Hello,

Open an ssh session and then "touch your_file" (touch content.jar), mirrors will be synchronized.

In french : http://forum.tuxfamily.org/viewtopic.php?id=477

Re: 0kb size after uploading files to ftp

That's strange, especially the "IO error" stuff.

If you can reproduce this issue each time, I am interested on how you manage to do that, this may be a bug on our side.

By the way, what do you mean by 0kb size ? 0kb size on your ftp client or 0kb size on our http servers that distribute the content ?

Sylvain

4 (edited by nkrasko 2011-01-08 21:31:24)

Re: 0kb size after uploading files to ftp

Hello, I was playing with eclipse update site continuously coping new versions with replacing old files. Don't know exactly when the problem appeared, because I saw the problem with my eclipse site - wrong structure, and was trying to fix it, blaming eclipse and myself. Only after some time I noticed problem with the size of the copied files.

After marck answer I tried touch command, but that didn't solve the problem. Copying of content.jar with ftp client gave 0kb again. It was 0kb with any ftp client I have, with http interface and in direct access with ssh window.

For now I have a work around and use WinSCP. It works fine. But I will definitely return to this a little bit later because going to use script for publishing new version of files.

Re: 0kb size after uploading files to ftp

Tried to copy with content.jar with FileZilla and problem is still there. content.jar has 0kb size. Strange thing that even after deleting content.jar from ftp I was still asked with the client if I want to overwrite. Here is a session log:

Status:    Resolving address of ftp.tuxfamily.org
Status:    Connecting to 212.85.158.7:21...
Status:    Connection established, waiting for welcome message...
Response:    220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response:    220-You are user number 2 of 50 allowed.
Response:    220-Local time is now 23:22. Server port: 21.
Response:    220-This is a private system - No anonymous login
Response:    220 You will be disconnected after 15 minutes of inactivity.
Command:    USER nkrasko
Response:    331 User nkrasko OK. Password required
Command:    PASS ********
Response:    230-User nkrasko has group access to:  eclihx     nkrasko   
Response:    230 OK. Current restricted directory is /
Command:    SYST
Response:    215 UNIX Type: L8
Command:    FEAT
Response:    211-Extensions supported:
Response:     EPRT
Response:     IDLE
Response:     MDTM
Response:     SIZE
Response:     REST STREAM
Response:     MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
Response:     MLSD
Response:     AUTH TLS
Response:     PBSZ
Response:     PROT
Response:     UTF8
Response:     TVFS
Response:     ESTA
Response:     PASV
Response:     EPSV
Response:     SPSV
Response:     ESTP
Response:    211 End.
Command:    OPTS UTF8 ON
Response:    200 OK, UTF-8 enabled
Status:    Connected
Status:    Retrieving directory listing...
Command:    PWD
Response:    257 "/" is your current location
Command:    TYPE I
Response:    200 TYPE is now 8-bit binary
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,44,154)
Command:    MLSD
Response:    150 Accepted data connection
Response:    226-Options: -a -l
Response:    226 4 matches total
Status:    Directory listing successful
Status:    Retrieving directory listing...
Command:    CWD eclihx
Response:    250 OK. Current directory is /eclihx
Command:    PWD
Response:    257 "/eclihx" is your current location
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,59,37)
Command:    MLSD
Response:    150 Accepted data connection
Response:    226-Options: -a -l
Response:    226 3 matches total
Status:    Directory listing successful
Status:    Retrieving directory listing...
Command:    CWD eclihx-repository
Response:    250 OK. Current directory is /eclihx/eclihx-repository
Command:    PWD
Response:    257 "/eclihx/eclihx-repository" is your current location
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,75,22)
Command:    MLSD
Response:    150 Accepted data connection
Response:    226-Options: -a -l
Response:    226 5 matches total
Status:    Directory listing successful
Status:    Retrieving directory listing...
Command:    CWD updatesite
Response:    250 OK. Current directory is /eclihx/eclihx-repository/updatesite
Command:    PWD
Response:    257 "/eclihx/eclihx-repository/updatesite" is your current location
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,60,172)
Command:    MLSD
Response:    150 Accepted data connection
Response:    226-Options: -a -l
Response:    226 4 matches total
Status:    Directory listing successful
Status:    Retrieving directory listing...
Command:    CWD trunk
Response:    250 OK. Current directory is /eclihx/eclihx-repository/updatesite/trunk
Command:    PWD
Response:    257 "/eclihx/eclihx-repository/updatesite/trunk" is your current location
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,76,12)
Command:    MLSD
Response:    150 Accepted data connection
Response:    226-Options: -a -l
Response:    226 7 matches total
Status:    Directory listing successful
Command:    DELE content.jar
Response:    250 Deleted content.jar
Status:    Resolving address of ftp.tuxfamily.org
Status:    Connecting to 212.85.158.7:21...
Status:    Connection established, waiting for welcome message...
Response:    220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response:    220-You are user number 3 of 50 allowed.
Response:    220-Local time is now 23:24. Server port: 21.
Response:    220-This is a private system - No anonymous login
Response:    220 You will be disconnected after 15 minutes of inactivity.
Command:    USER nkrasko
Response:    331 User nkrasko OK. Password required
Command:    PASS ********
Response:    230-User nkrasko has group access to:  eclihx     nkrasko   
Response:    230 OK. Current restricted directory is /
Command:    OPTS UTF8 ON
Response:    200 OK, UTF-8 enabled
Status:    Connected
Status:    Starting upload of F:\Programs\haXe\eclihx_trunk\updates\content.jar
Command:    CWD /eclihx/eclihx-repository/updatesite/trunk
Response:    250 OK. Current directory is /eclihx/eclihx-repository/updatesite/trunk
Command:    PWD
Response:    257 "/eclihx/eclihx-repository/updatesite/trunk" is your current location
Command:    TYPE I
Response:    200 TYPE is now 8-bit binary
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,76,124)
Command:    STOR content.jar
Response:    150 Accepted data connection
Error:    Connection timed out
Error:    File transfer failed
Status:    Resolving address of ftp.tuxfamily.org
Status:    Connecting to 212.85.158.7:21...
Status:    Connection established, waiting for welcome message...
Response:    220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response:    220-You are user number 3 of 50 allowed.
Response:    220-Local time is now 23:24. Server port: 21.
Response:    220-This is a private system - No anonymous login
Response:    220 You will be disconnected after 15 minutes of inactivity.
Command:    USER nkrasko
Response:    331 User nkrasko OK. Password required
Command:    PASS ********
Response:    230-User nkrasko has group access to:  eclihx     nkrasko   
Response:    230 OK. Current restricted directory is /
Command:    OPTS UTF8 ON
Response:    200 OK, UTF-8 enabled
Status:    Connected
Status:    Starting upload of F:\Programs\haXe\eclihx_trunk\updates\content.jar
Command:    CWD /eclihx/eclihx-repository/updatesite/trunk
Response:    250 OK. Current directory is /eclihx/eclihx-repository/updatesite/trunk
Status:    Retrieving directory listing...
Command:    TYPE I
Response:    200 TYPE is now 8-bit binary
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,59,8)
Command:    MLSD
Response:    150 Accepted data connection
Response:    226-Options: -a -l
Response:    226 7 matches total
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,41,209)
Command:    STOR content.jar
Response:    150 Accepted data connection
Response:    226-Error during read from data connection
Response:    226 Transfer aborted
Status:    File transfer successful, transferred 8,322 bytes in 19 seconds
Status:    Retrieving directory listing...
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,62,228)
Command:    MLSD
Response:    150 Accepted data connection
Response:    226-Options: -a -l
Response:    226 7 matches total
Status:    Directory listing successful

I was also tried to copy content.jar to other directory:

Status:    Connected
Status:    Starting upload of F:\Programs\haXe\eclihx_trunk\updates\content.jar
Command:    CWD /eclihx/eclihx-repository/updatesite
Response:    250 OK. Current directory is /eclihx/eclihx-repository/updatesite
Command:    PWD
Response:    257 "/eclihx/eclihx-repository/updatesite" is your current location
Command:    TYPE I
Response:    200 TYPE is now 8-bit binary
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,59,2)
Command:    STOR content.jar
Response:    150 Accepted data connection
Response:    226-Error during read from data connection
Response:    226 Transfer aborted
Status:    File transfer successful, transferred 8,322 bytes in 19 seconds
Status:    Retrieving directory listing...
Command:    PASV
Response:    227 Entering Passive Mode (212,85,158,7,40,8)
Command:    MLSD
Response:    150 Accepted data connection
Response:    226-Options: -a -l
Response:    226 5 matches total
Status:    Directory listing successful

And there's a zero size again confirmed with ls in ssh session

nkrasko@pastis:~/eclihx/eclihx-repository/updatesite$ ls -l
total 8
-rw-rw-r-- 1 nkrasko eclihx    0 2011-01-08 22:34 content.jar
drwxrwsr-x 1 nkrasko eclihx 4096 2011-01-05 17:59 stable
drwxrwsr-x 1 nkrasko eclihx 4096 2011-01-08 22:29 trunk

Right after that I opened WinSCP and was able to copy all files including content.jar from the same source directory:
nkrasko@pastis:~/eclihx/eclihx-repository/updatesite/trunk$ ls -l
total 28
-rw-r--r-- 1 nkrasko eclihx  766 2011-01-08 22:00 artifacts.jar
-rw-r--r-- 1 nkrasko eclihx 8322 2011-01-08 22:00 content.jar
drwxr-sr-x 1 nkrasko eclihx 4096 2011-01-08 22:44 features
drwxr-sr-x 1 nkrasko eclihx 4096 2011-01-08 22:44 plugins
-rw-r--r-- 1 nkrasko eclihx  551 2011-01-08 22:00 site.xml

Sorry for posing logs into messages, probably I should have post a email with the file or something...

Re: 0kb size after uploading files to ftp

Hi,

Marck's answer is not relevant for your issue.

There is obviously an issue about new TCP connections from you to our FTP server:

nkrasko wrote:

Error:    Connection timed out
Error:    File transfer failed

Response:    150 Accepted data connection
Response:    226-Error during read from data connection
Response:    226 Transfer aborted

Are you using some firewall that fails to find related data FTP connections or are you behind a NAT that doesn't work correctly with the complexity of the FTP protocol ?

Sylvain

Re: 0kb size after uploading files to ftp

Thank you, Sylvain. Looks like I have solved the problem with update firmware on my WiFi router.

Re: 0kb size after uploading files to ftp

Hehe, I'm not surprised that it fixed the issue ;-)