Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Files are downloading with zero kb if the destination folder has zero space ,

Abhilash E wrote:

Hi,
I am facing in issue while downloading file via winscp SFTP connection in c# language , here am downloading files from remote directory lo local directory , if the local directory has zero space then the files are creating with zero kb , how to prevent creating zero kb files in this scenario and how to through the error in c# if the file is downloaded with zero kb

Please start a new thread and include a full WinSCP session log file.
Abhilash E

Files are downloading with zero kb if the destination folder has zero space ,

Hi,
I am facing in issue while downloading file via winscp SFTP connection in c# language , here am downloading files from remote directory lo local directory , if the local directory has zero space then the files are creating with zero kb , how to prevent creating zero kb files in this scenario and how to through the error in c# if the file is downloaded with zero kb
Answer

On the server, the quota is full
martin

Re: WinSCP FTPing ZERO byte files

So, again. I've asked "Frank.You" already to start a new topic. Please do.

The same for "fgiorgio", as in his case it's SFTP and no proxy, so again completely irrelevant.
And I would need the same answers I asked "Frank.You" for.

Thanks..
fgiorgio

upload files 0 bytes

Hi
I am facing the same issue as other users. I have WinSCP 5.1.7.
I am uploading Varien.php on /var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract
It asks me to overwite. I say Yes. Everything seems to be ok, BUT the file is zero bytes.

Thanks

Attaching the log file here (I hided some personal information):
. 2013-08-21 10.44.10.265 --------------------------------------------------------------------------
. 2013-08-21 10.44.10.265 WinSCP Versione 5.1.7 (Build 3446) (OS 5.1.2600 Service Pack 3)
. 2013-08-21 10.44.10.265 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2013-08-21 10.44.10.265 Local account: DESKTOP
. 2013-08-21 10.44.10.265 Working directory: C:\Documents and Settings\Desktop
. 2013-08-21 10.44.10.265 Process ID: 2196
. 2013-08-21 10.44.10.265 Command-line: "C:\Programmi\WinSCP\WinSCP.exe"
. 2013-08-21 10.44.10.265 Time zone: Current: GMT+2, Standard: GMT+1, DST: GMT+2, DST Start: 31/03/2013, DST End: 27/10/2013
. 2013-08-21 10.44.10.265 Login time: mercoledì 21 agosto 2013 10.44.10
. 2013-08-21 10.44.10.265 --------------------------------------------------------------------------
. 2013-08-21 10.44.10.265 Session name: username@MY_IP_ADDRESS (Stored session)
. 2013-08-21 10.44.10.265 Host name: MY_IP_ADDRESS (Port: 22)
. 2013-08-21 10.44.10.265 User name: username (Password: No, Key file: Yes)
. 2013-08-21 10.44.10.265 Tunnel: No
. 2013-08-21 10.44.10.265 Transfer Protocol: SFTP (SCP)
. 2013-08-21 10.44.10.265 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2013-08-21 10.44.10.265 Proxy: none
. 2013-08-21 10.44.10.265 SSH protocol version: 2; Compression: No
. 2013-08-21 10.44.10.265 Bypass authentication: No
. 2013-08-21 10.44.10.265 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2013-08-21 10.44.10.265 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2013-08-21 10.44.10.265 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2013-08-21 10.44.10.265 Return code variable: Autodetect; Lookup user groups: A
. 2013-08-21 10.44.10.265 Shell: sudo su -
. 2013-08-21 10.44.10.265 EOL: 0, UTF: 2
. 2013-08-21 10.44.10.265 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2013-08-21 10.44.10.265 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2013-08-21 10.44.10.265 SFTP Bugs: A,A
. 2013-08-21 10.44.10.265 SFTP Server: default
. 2013-08-21 10.44.10.265 Local directory: C:\temp, Remote directory: /var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract, Update: Yes, Cache: Yes
. 2013-08-21 10.44.10.265 Cache directory changes: Yes, Permanent: Yes
. 2013-08-21 10.44.10.265 DST mode: 1; Timezone offset: 0h 0m
. 2013-08-21 10.44.10.265 --------------------------------------------------------------------------
. 2013-08-21 10.44.10.328 Looking up host "MY_IP_ADDRESS"
. 2013-08-21 10.44.10.328 Connecting to MY_IP_ADDRESS port 22
. 2013-08-21 10.44.10.703 Server version: SSH-2.0-OpenSSH_6.1p1 Debian-4
. 2013-08-21 10.44.10.703 Using SSH protocol version 2
. 2013-08-21 10.44.10.703 We claim version: SSH-2.0-WinSCP_release_5.1.7
. 2013-08-21 10.44.10.828 Doing Diffie-Hellman group exchange
. 2013-08-21 10.44.11.125 Doing Diffie-Hellman key exchange with hash SHA-1
. 2013-08-21 10.44.11.468 Verifying host key rsa2 0x10001,0xa152aa7b900f01de 6a4fddc1f8cb6965 9943ef0303dec13a 6e7826ac2131eb78 d45ed7a89b5a8828 5e899e18227d7387 80f5c444e2996630 a4fc1d10905838e1 2b2206c361499e60 eafeae1cb3b550eb 7be4a39792454762 61c01913ec7fe4ef 411903b928d0aa27 46960e8b50a96994 b1ebd04e7029f4ce 29617e46d8c0f3de ce7d454efbd90f4e adc689410532265f 76ff42fc12ffefc4 8ce1c10a8bd69183 df43d3f276a53ebc 4aaf3c35a8b3a8ba 6b0105f15d38e3d9 26bbf029bbab692b fe58c814719368b6 2fe9571a932821a7 ea27f23f6f475388 b96257df0804d278 9a592c2d952dd22a b6446faa96ee0ed3 093a7508b03d54e6 80f6554ba8c3b273  with fingerprint ssh-rsa 2048 b5:84:07:02:3a:2d:b7:78:6e:1e:9f:b5:f3:ba:af:99
. 2013-08-21 10.44.11.500 Host key matches cached key
. 2013-08-21 10.44.11.500 Host key fingerprint is:
. 2013-08-21 10.44.11.500 ssh-rsa 2048 b5:84:07:02:3a:2d:b7:78:6e:1e:9f:b5:f3:ba:af:99
. 2013-08-21 10.44.11.500 Initialised AES-256 SDCTR client->server encryption
. 2013-08-21 10.44.11.500 Initialised HMAC-SHA1 client->server MAC algorithm
. 2013-08-21 10.44.11.500 Initialised AES-256 SDCTR server->client encryption
. 2013-08-21 10.44.11.500 Initialised HMAC-SHA1 server->client MAC algorithm
. 2013-08-21 10.44.11.781 Reading private key file "MY_KEY.ppk"
! 2013-08-21 10.44.11.781 Using username "username".
. 2013-08-21 10.44.11.921 Offered public key
. 2013-08-21 10.44.12.062 Offer of public key accepted
! 2013-08-21 10.44.12.062 Authenticating with public key "imported-openssh-key"
. 2013-08-21 10.44.12.281 Sent public key signature
. 2013-08-21 10.44.12.578 Access granted
. 2013-08-21 10.44.13.015 Opened channel for session
. 2013-08-21 10.44.13.265 Started a shell/command
. 2013-08-21 10.44.13.265 --------------------------------------------------------------------------
. 2013-08-21 10.44.13.265 Using SFTP protocol.
. 2013-08-21 10.44.13.265 Doing startup conversation with host.
> 2013-08-21 10.44.13.328 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2013-08-21 10.44.13.453 Type: SSH_FXP_VERSION, Size: 124, Number: -1
. 2013-08-21 10.44.13.453 SFTP version 3 negotiated.
. 2013-08-21 10.44.13.453 Unknown server extension posix-rename@openssh.com="1"
. 2013-08-21 10.44.13.453 Unknown server extension statvfs@openssh.com="2"
. 2013-08-21 10.44.13.453 Unknown server extension fstatvfs@openssh.com="2"
. 2013-08-21 10.44.13.453 Unknown server extension hardlink@openssh.com="1"
. 2013-08-21 10.44.13.453 We believe the server has signed timestamps bug
. 2013-08-21 10.44.13.453 We will use UTF-8 strings for status messages only
. 2013-08-21 10.44.13.453 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2013-08-21 10.44.13.468 Changing directory to "/var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract".
. 2013-08-21 10.44.13.468 Getting real path for '/var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract'
> 2013-08-21 10.44.13.468 Type: SSH_FXP_REALPATH, Size: 72, Number: 16
< 2013-08-21 10.44.13.609 Type: SSH_FXP_NAME, Size: 147, Number: 16
. 2013-08-21 10.44.13.609 Real path is '/var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract'
. 2013-08-21 10.44.13.609 Trying to open directory "/var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract".
> 2013-08-21 10.44.13.609 Type: SSH_FXP_LSTAT, Size: 72, Number: 263
< 2013-08-21 10.44.13.734 Type: SSH_FXP_ATTRS, Size: 37, Number: 263
. 2013-08-21 10.44.13.734 Getting current directory name.
. 2013-08-21 10.44.13.875 Listing directory "/var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract".
> 2013-08-21 10.44.13.875 Type: SSH_FXP_OPENDIR, Size: 72, Number: 523
< 2013-08-21 10.44.14.015 Type: SSH_FXP_HANDLE, Size: 13, Number: 523
> 2013-08-21 10.44.14.015 Type: SSH_FXP_READDIR, Size: 13, Number: 780
< 2013-08-21 10.44.14.140 Type: SSH_FXP_NAME, Size: 559, Number: 780
> 2013-08-21 10.44.14.140 Type: SSH_FXP_READDIR, Size: 13, Number: 1036
< 2013-08-21 10.44.14.265 Type: SSH_FXP_STATUS, Size: 28, Number: 1036
< 2013-08-21 10.44.14.265 Status code: 1
> 2013-08-21 10.44.14.265 Type: SSH_FXP_CLOSE, Size: 13, Number: 1284
. 2013-08-21 10.44.14.265 ..;d;4096;2012-07-05T10:49:29.000Z;"username" [1000];"root" [0];rwxrwxrwx;1
. 2013-08-21 10.44.14.265 Varien_old.php;-;0;2012-07-05T10:49:29.000Z;"username" [1000];"username" [1000];rw-rw-r--;0
. 2013-08-21 10.44.14.265 Zend.php;-;4726;2012-07-05T10:49:29.000Z;"username" [1000];"root" [0];rwxrwxrwx;1
. 2013-08-21 10.44.14.265 Varien.php;-;0;2012-07-05T10:49:29.000Z;"username" [1000];"root" [0];rwxrwxrwt;1
. 2013-08-21 10.44.14.343 Startup conversation with host finished.
. 2013-08-21 10.44.20.234 Copying 1 files/directories to remote directory "/var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract/"
. 2013-08-21 10.44.20.234   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: Yes; Mask: *.*
. 2013-08-21 10.44.20.234   TM: B; ClAr: No; CPS: 0; InclM:
. 2013-08-21 10.44.20.234   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2013-08-21 10.44.20.234 File: "C:\temp\Varien.php"
. 2013-08-21 10.44.20.250 Copying "C:\temp\Varien.php" to remote directory started.
. 2013-08-21 10.44.20.250 Binary transfer mode selected.
. 2013-08-21 10.44.20.250 Opening remote file.
> 2013-08-21 10.44.20.250 Type: SSH_FXP_OPEN, Size: 99, Number: 1539
< 2013-08-21 10.44.20.250 Type: SSH_FXP_STATUS, Size: 24, Number: 1284
. 2013-08-21 10.44.20.250 Discarding reserved response
< 2013-08-21 10.44.20.375 Type: SSH_FXP_STATUS, Size: 24, Number: 1539
< 2013-08-21 10.44.20.375 Status code: 4, Message: 1539, Server: Failure, Language: 
. 2013-08-21 10.44.20.375 Cannot create new file "/var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php", checking if it exists already
> 2013-08-21 10.44.20.375 Type: SSH_FXP_LSTAT, Size: 83, Number: 1799
< 2013-08-21 10.44.20.500 Type: SSH_FXP_ATTRS, Size: 37, Number: 1799
. 2013-08-21 10.44.20.500 Asking user:
. 2013-08-21 10.44.20.500 Il file remoto 'Varien.php' esiste già. Sovrascrivere?
. 2013-08-21 10.44.20.500 
. 2013-08-21 10.44.20.500 Nuovo:       12224 byte, 05/07/2012 13.49.29
. 2013-08-21 10.44.20.500 Esistente:   0 byte, 05/07/2012 13.49.29 ()
> 2013-08-21 10.44.21.687 Type: SSH_FXP_OPEN, Size: 99, Number: 2051
< 2013-08-21 10.44.21.812 Type: SSH_FXP_HANDLE, Size: 13, Number: 2051
> 2013-08-21 10.44.21.812 Type: SSH_FXP_WRITE, Size: 4121, Number: 2566
. 2013-08-21 10.44.21.812 2 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2013-08-21 10.44.21.812 Type: SSH_FXP_CLOSE, Size: 13, Number: 3332
> 2013-08-21 10.44.21.812 Type: SSH_FXP_SETSTAT, Size: 95, Number: 2313
< 2013-08-21 10.44.22.046 Type: SSH_FXP_STATUS, Size: 24, Number: 2566
< 2013-08-21 10.44.22.156 Type: SSH_FXP_STATUS, Size: 24, Number: 2822
< 2013-08-21 10.44.22.234 Type: SSH_FXP_STATUS, Size: 24, Number: 3078
< 2013-08-21 10.44.22.234 Type: SSH_FXP_STATUS, Size: 24, Number: 3332
< 2013-08-21 10.44.22.234 Status code: 0
. 2013-08-21 10.44.22.234 Preserving timestamp [2012-07-05T10:49:29.000Z]
< 2013-08-21 10.44.22.234 Type: SSH_FXP_STATUS, Size: 24, Number: 2313
< 2013-08-21 10.44.22.234 Status code: 0
. 2013-08-21 10.44.22.234 Listing directory "/var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract".
> 2013-08-21 10.44.22.234 Type: SSH_FXP_OPENDIR, Size: 72, Number: 3595
< 2013-08-21 10.44.22.359 Type: SSH_FXP_HANDLE, Size: 13, Number: 3595
> 2013-08-21 10.44.22.359 Type: SSH_FXP_READDIR, Size: 13, Number: 3852
< 2013-08-21 10.44.22.500 Type: SSH_FXP_NAME, Size: 559, Number: 3852
> 2013-08-21 10.44.22.500 Type: SSH_FXP_READDIR, Size: 13, Number: 4108
< 2013-08-21 10.44.22.625 Type: SSH_FXP_STATUS, Size: 28, Number: 4108
< 2013-08-21 10.44.22.625 Status code: 1
> 2013-08-21 10.44.22.625 Type: SSH_FXP_CLOSE, Size: 13, Number: 4356
. 2013-08-21 10.44.22.625 ..;d;4096;2012-07-05T10:49:29.000Z;"username" [1000];"root" [0];rwxrwxrwx;1
. 2013-08-21 10.44.22.625 Varien_old.php;-;0;2012-07-05T10:49:29.000Z;"username" [1000];"username" [1000];rw-rw-r--;0
. 2013-08-21 10.44.22.625 Zend.php;-;4726;2012-07-05T10:49:29.000Z;"username" [1000];"root" [0];rwxrwxrwx;1
. 2013-08-21 10.44.22.625 Varien.php;-;0;2012-07-05T10:49:29.000Z;"username" [1000];"root" [0];rwxrwxrwt;1
. 2013-08-21 10.44.23.812 Getting current directory name.
. 2013-08-21 10.44.23.812 Listing directory "/var/www/magento/app/code/core/Mage/Core/Model/Session/Abstract".
> 2013-08-21 10.44.23.812 Type: SSH_FXP_OPENDIR, Size: 72, Number: 4619
< 2013-08-21 10.44.23.812 Type: SSH_FXP_STATUS, Size: 24, Number: 4356
. 2013-08-21 10.44.23.812 Discarding reserved response
< 2013-08-21 10.44.23.937 Type: SSH_FXP_HANDLE, Size: 13, Number: 4619
> 2013-08-21 10.44.23.937 Type: SSH_FXP_READDIR, Size: 13, Number: 4876
< 2013-08-21 10.44.24.078 Type: SSH_FXP_NAME, Size: 559, Number: 4876
> 2013-08-21 10.44.24.078 Type: SSH_FXP_READDIR, Size: 13, Number: 5132
< 2013-08-21 10.44.24.203 Type: SSH_FXP_STATUS, Size: 28, Number: 5132
< 2013-08-21 10.44.24.203 Status code: 1
> 2013-08-21 10.44.24.203 Type: SSH_FXP_CLOSE, Size: 13, Number: 5380
. 2013-08-21 10.44.24.203 ..;d;4096;2012-07-05T10:49:29.000Z;"username" [1000];"root" [0];rwxrwxrwx;1
. 2013-08-21 10.44.24.203 Varien_old.php;-;0;2012-07-05T10:49:29.000Z;"username" [1000];"username" [1000];rw-rw-r--;0
. 2013-08-21 10.44.24.203 Zend.php;-;4726;2012-07-05T10:49:29.000Z;"username" [1000];"root" [0];rwxrwxrwx;1
. 2013-08-21 10.44.24.203 Varien.php;-;0;2012-07-05T10:49:29.000Z;"username" [1000];"root" [0];rwxrwxrwt;1
Frank.You

WinSCP FTPing ZERO byte files

martin wrote:

Please start a new thread as this seem like a completely different problem to this topic.
Also please share more details, like
Does it happen every time? Certain files only? For certain transfer modes only (ascii/binary)? With proxy only? With SSL only? Upload/download only? Completely randomly?
Please post a log file using the latest 5.2.x beta.

Hi Martin,
I posted two log files(one use proxy and another use none proxy),
---------------------------------
File Protocal:FTP
Encryption:SSL Explicit encryption
Proxy Type:SOCKET5
WinSCP Version:WinSCP 5.2.2
OS Version:Windows Server 2008 R2
---------------------------------

with proxy via SSL,the .txt file can be uploaded successfully ,but the file size is ZERO(local .txt file size is very small);

with proxy via SSL,the .txt file can be uploaded successfully , the file size > ZERO(local .txt file size is big);

with none proxy via SSL, everything is ok.

I have compared the two log file,I found that with proxy the log file exist a log-line :"Error retrieving server address, cannot test if address is routable",but another log file not exist.

TEST:
Use proxy
1.when the .txt file size is 4K, uploaded to FTP server size be showed ZERO;
2.when the .txt file size is 49K,uploaded to FTP server size > ZERO;

Thanks a lot!

Regards,
Frank
martin

Frank.You wrote:

I have Got the same problem(Files transed successfully,but transed file size is ZERO) with FTPs and Proxy (use GUI).

Please start a new thread as this seem like a completely different problem to this topic.
Also please share more details, like
Does it happen every time? Certain files only? For certain transfer modes only (ascii/binary)? With proxy only? With SSL only? Upload/download only? Completely randomly?
Please post a log file using the latest 5.2.x beta.
PrateekG

Hi Martin,

Thanks for the inputs. We are working over this and if successful will share the results on the forum.

Also, previously you have told that zero byte files are getting transferred due to multiple WinSCP sessions are running. That helped us resolving our issue. We have tested and were able to reproduce the same scenario. As we were using a temporary file to store the names of the files that were required to be FTPed, and all winscp sessions were using the same temporary file, files were missing and transferred as zero byte.

Regards,
Prateek
Frank.You

Hello Martin,
I have Got the same problem(Files transed successfully,but transed file size is ZERO) with FTPs and Proxy (use GUI).
_________________________________________________
File Protocal:FTP
Encryption:SSL Explicit encryption
Proxy Type:SOCKET5
WinSCP Version:WinSCP 5.1.6
OS Version:Windows Server 2003 SP2
_________________________________________________

Expect your reply,

Regards,

Frank.
PrateekG

Hello Martin,

I am posting the WinSCP script I am using to FTP the files to server. I am facing few issues while using this script:
1. Zero byte files getting transferred to server
2. Incomplete files getting transferred to server
3. Files getting missed out during transfer

Can you suggest the measures/improvements I can do in this script to eliminate/reduce these issues?

Regards,
Prateek
martin

From the session log, I can see that you have two processes/sessions uploading the very same file to the very same folder on the same server. This is likely a cause of your problems.
PrateekG

Hi Martin,

Attached is the matching session logs for zero byte transfer of file.

Regards,
Prateek
martin

I do not see the same pattern in these logs as in the RTLOG_Zero_byte.txt from your first post. In your first post, I could definitely see that no9 data were sent, while in this case the transfer looks normal in all the transfer of the file you refer to.
Can you please send me single debug log as well as matching session log for a single zero-byte transfer, as you did in your first post?
PrateekG

Hello Martin,

RTLOG_01005_20130710135202.DAT file came as zero byte. I got the reference of this file in 2 trace logs so I have uploaded both of them.

Regards,
Prateek
martin

Thanks. Though I'd appreciate some comment to the logs. Why they are two? I can see two transfers in each log, neither seem to be zero-sized. Can you name the file that you believe was zero-sized?
PrateekG

Hi Martin,

I have implemented the debug WinSCP version and get the trace logs for 0 byte file FTPed. I am attaching them.

Regards,
Prateek
martin

Re: WinSCP FTPing ZERO byte files

Thanks for your report.
I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
PrateekG

WinSCP FTPing ZERO byte files

Hi,

I am facing an issue where WinSCP FTPs zero byte file out of many files it transfers successfully. What I mean is if WinSCP is transferring 20 files in a run, out of that 1 or 2 files are sometimes of zero bytes.

I have compared the logs for successful transfer of file and zero byte transfer of file and got some difference but not able to deduce any conclusion from that.

We have implemented a script where it FTPs all the files from a specific folder every 30 mins.

I am attaching the logs for reference. Your help in resolving this issue will be highly appriciated.

Regards,
Prateek