Files are getting uploaded with 0 KB size.

Advertisement

Varun
Joined:
Posts:
13

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:
41,276
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:
13

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:
41,276
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:
13

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

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:
13

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:
13

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

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

Varun
Joined:
Posts:
13

Re: Files are getting uploaded with 0 KB size.

Hi Martin,

Please find the attached logs.

The logs are after doing SessionOptions.AddRawSettings("SendBuf", "0") changes as per your advice.

Then too the issue persist.

Please take this on priority and provide us the solution.

Waiting for your acknowledgment.

Thanks.
  • Logs.zip (333.29 KB, Private file)
Description: Logs

Reply with quote

Varun
Joined:
Posts:
13

Files are getting uploaded with 0 KB size.

Hi Martin,
We have restarted the server before doing the file transfer. Also, there were some files already present in .filepart and 0kb state on the remote server.
But for the new files the issue is still been observed.
Also, we have tried with TransferOptions.ResumeSupport.State to Off. But then too issue persist.

Waiting for your acknowledgment.

Thanks.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,276
Location:
Prague, Czechia

Re: Files are getting uploaded with 0 KB size.

Varun wrote:

Also, we have tried with TransferOptions.ResumeSupport.State to Off. But then too issue persist.
Please post a log file for that.

Reply with quote

Varun
Joined:
Posts:
13

Re: Files are getting uploaded with 0 KB size.

Hi Martin,

Please find the attached logs ]after TransferOptions.ResumeSupport.State set to Off.

Waiting for your acknowledgement.

Thanks.
  • Logs.zip (388.54 KB, Private file)
Description: Logs

Reply with quote

martin
Site Admin
martin avatar

Re: Files are getting uploaded with 0 KB size.

Thanks.
Though I was not able to identify what causes the problem in the communication between the server and WinSCP. Sorry.

Reply with quote

Varun
Joined:
Posts:
13

Files are getting uploaded with 0 KB size.

Hi martin,

Need your help.

We have raised the similar concern with server. We got the following response :

"When the customer attempted to upload the file the first time, the server waits for the client to send the data to write the file in the folder. In these cases, the data did not reach the server, so the file could not be written. However, the SSH Listener/Service will wait the configured time for the data from the client before it releases the new file. By default the Listeners will wait 10 minutes over the network waiting for the data before it returns an error. This client, attempts to upload the file multiple times with multiple connections during the 10 minutes the SSH service is waiting for the data of the first connection. During this time the file is locked until after the network timeout.

This issue is caused by something between the client and the server. Since this is specific to this particular user/client, and your other users are not experiencing this issue, we conclude the issue is caused by something in the user/client environment."



Please help us martin. Is there any way we can find where is the problem???

Waiting for you acknowledgment.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Files are getting uploaded with 0 KB size.

I'm sorry, but there's no information in that post that can help me to identify the problem.

Reply with quote

Varun
Joined:
Posts:
13

Files are getting uploaded with 0 KB size

Hi Martin,

I have already share the information in pervious posts.
Apart from that please tell us which information you what so that we can provide you.

Waiting for your acknowledgment

Reply with quote

martin
Site Admin
martin avatar

Re: Files are getting uploaded with 0 KB size

If I knew how to debug the problem, I would have asked already before. I'm sorry, but I do not know how to help you.

Reply with quote

ignisdev
Joined:
Posts:
1
Location:
UK

Re: Files are getting uploaded with 0 KB size.

martin wrote:

I'm sorry, but there's no information in that post that can help me to identify the problem.

Hello,

First time posting. Recently my WinSCP starts to upload 0 KB files (any kind of files) and I would like to share my thoughts. In my case it all comes down to SSL certs - while connecting without SSL, files are getting uploaded, but when using SSL (Lets Encrypt) WinSCP uploads 0 KB. If I'm using valid (even self-signed) SSL everything works fine, but with Lets Encrypt it fails. I tried the same with Filezilla and it handles situation the right way - it reports SSL cert (even expired), but connects anyway and uploads files as usual. I cleared cached host keys in my WinSCP, reconnect with SSL (valid Lets Encrypt cert just generated), dialog box appeared and confirms that SSL cert is valid, however WinSCP still uploads 0 KB files.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,276
Location:
Prague, Czechia

Re: Files are getting uploaded with 0 KB size.

ignisdev wrote:

First time posting. Recently my WinSCP starts to upload 0 KB files (any kind of files) and I would like to share my thoughts. In my case it all comes down to SSL certs - while connecting without SSL, files are getting uploaded, but when using SSL (Lets Encrypt) WinSCP uploads 0 KB. If I'm using valid (even self-signed) SSL everything works fine, but with Lets Encrypt it fails. I tried the same with Filezilla and it handles situation the right way - it reports SSL cert (even expired), but connects anyway and uploads files as usual. I cleared cached host keys in my WinSCP, reconnect with SSL (valid Lets Encrypt cert just generated), dialog box appeared and confirms that SSL cert is valid, however WinSCP still uploads 0 KB files.
Thanks for your report.
Can you please post WinSCP session log file on level Debug 2 showing the upload both using self-signed certificate and Let's encrypt certificate? Verbose FileZilla log file showing a successful upload might be useful as well.

Reply with quote

Advertisement

You can post new topics in this forum