Files are getting uploaded with 0 KB size.

Advertisement

Varun
Joined:
Posts:
6

Files are getting uploaded with 0 KB size.

Hi,
We are facing issue in file upload from one server to another server.
Suppose there are 10 files then 5 files are getting uploaded successfully and the remaining file are getting uploaded and stuck with 0 KB or O KB with filepart or some size with filepart.

For Example :
File 1 : abc.xml (size : 90 KB)
File 2 : def.img (size : 1 MB)
File 3 : xyz.img (size : 2053 KB)

then on remote server the above files are as :
File 1 : abc.xml (size : 0 KB)
File 2 : def.img.filepart (size : 0 KB)
File 3 : xyz.img.filepart (size : 1885 KB)
but this is not with all the files. As i said above among 10 files 5 are having such problem.

Log say's as below :
Caught Remote Exception, Remote Directory is \bank_600059000\4669, Error Code:Cannot overwrite remote file '/Folder_1/Folder_2/def.IMG.filepart'.$$
Press 'Delete' to delete the file and create new one instead of overwriting it.$$
General failure (server should provide error description).
Error code: 4
Error message from server: Failed to open local file
Common reasons for the Error code 4 are:
- Renaming a file to a name of already existing file.
- Creating a directory that already exists.
- Moving a remote file to a different filesystem (HDD).
- Uploading a file to a full filesystem (HDD).
- Exceeding a user disk quota.

Need your help.
Thanks.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
31,060
Location:
Prague, Czechia

Re: Files are getting uploaded with 0 KB size.

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Varun
Joined:
Posts:
6

Files are getting uploaded with 0 KB size.

Hi Martin,

Please find the attached log.

Some of the affected file name that can be find in logs for analysis are:
1. XYZ_500059002_03062019_160032_01_0000000001_01.IMG.filepart
2. XYZ_680059007_03062019_155938_01_0000000017_01.IMG.filepart
3. XYZ_680059007_03062019_160012_01_0000000024_01.IMG.filepart
4. ABC_680059007_03062019_155928_01_0000000007.xml
5. ABC_680059007_03062019_155930_01_0000000009.xml

Please acknowledge us asap.

Thanks for your help.
  • WinSCP.zip (357.9 KB, Private file)
Description: WinSCP log

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
31,060
Location:
Prague, Czechia

Re: Files are getting uploaded with 0 KB size.

Can you do ListDirectory on the target directory before you try to upload? And post a new log file for that.

Do have the problem always with the same files? Or is it random?

Can you overwrite those files in WinSCP GUI? Or with any other SFTP client?

Reply with quote

Varun
Joined:
Posts:
6

Files are getting uploaded with 0 KB size.

Hi Martin,

We will provide you the log soon.

The problem is random in nature and not for same files.

We have also tried with WinSCP GUI, but through it also file was not getting overwrite.

But when we tried with filezilla, overwrite was happening and file was getting upload successfully.

Thanks.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
31,060
Location:
Prague, Czechia

Re: Files are getting uploaded with 0 KB size.

So please a FileZilla log file as well.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
31,060
Location:
Prague, Czechia

Re: Files are getting uploaded with 0 KB size.

I have checked the logs again. What actually happens is that the connection is lost, WinSCP reconnects and tries to resume the transfer. An that's what fails. Possibly because the server still keeps the file locked from the previous session.
Try calling SessionOptions.AddRawSettings("SendBuf", "0")

Reply with quote

Varun
Joined:
Posts:
6

Files are getting uploaded with 0 KB size.

Hi Martin,

We tried with SessionOptions.AddRawSettings("SendBuf", "0") but the issue is not resolved.

Thanks.

Reply with quote

Varun
Joined:
Posts:
6

Files are getting uploaded with 0 KB size.

Hi Martin,

Please find the file_zilla log and some WinSCP client screenshot.

Thanks
  • FileZilla.zip (3.17 KB, Private file)
Description: FileZilla log
  • WinSCP.zip (508.33 KB, Private file)
Description: WinSCP log

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
31,060
Location:
Prague, Czechia

Re: Files are getting uploaded with 0 KB size.

Can you please post new WinSCP logs? And a real FileZilla log file (not a copy of the message log from FileZilla GUI).

Reply with quote

Advertisement

You can post new topics in this forum