File content is missing/truncated during GET

Advertisement

gary.voo
Guest

File content is missing/truncated during GET

Hi WinSCP support,

We run SFTP GET script to download file using WinSCP and found that the downloaded file is being truncated. See the logs below, the file size in remote folder shown as 188257 bytes, however the downloaded file size is only 34000 bytes and the content is truncated. Not sure whether is it configuration or connection issue. Kindly advise how to fix this issue.

. 2020-01-14 08:30:03.743 File: '/CRC_APP_APPAUDIT/ToCopy/Audit_PIIWCCH101P_20200114_073001.log' [2020-01-14T07:28:54.000Z] [188257]
. 2020-01-14 08:30:03.743 Copying "/CRC_APP_APPAUDIT/ToCopy/Audit_PIIWCCH101P_20200114_073001.log" to local directory started.
. 2020-01-14 08:30:03.743 Binary transfer mode selected.
. 2020-01-14 08:30:03.743 Checking existence of partially transferred file.
. 2020-01-14 08:30:03.743 Opening remote file.
> 2020-01-14 08:30:03.743 Type: SSH_FXP_OPEN, Size: 84, Number: 7171
< 2020-01-14 08:30:03.743 Type: SSH_FXP_STATUS, Size: 17, Number: 6916
. 2020-01-14 08:30:03.743 Discarding reserved response
< 2020-01-14 08:30:03.775 Type: SSH_FXP_HANDLE, Size: 13, Number: 7171
> 2020-01-14 08:30:03.775 Type: SSH_FXP_FSTAT, Size: 17, Number: 7432
< 2020-01-14 08:30:03.775 Type: SSH_FXP_ATTRS, Size: 46, Number: 7432
> 2020-01-14 08:30:03.775 Type: SSH_FXP_READ, Size: 25, Number: 7685
. 2020-01-14 08:30:03.775 Storing reserved response
. 2020-01-14 08:30:03.775 Storing reserved response
. 2020-01-14 08:30:03.775 Storing reserved response
. 2020-01-14 08:30:03.790 Storing reserved response
. 2020-01-14 08:30:03.790 Storing reserved response
. 2020-01-14 08:30:03.790 Storing reserved response
< 2020-01-14 08:30:03.790 Status code: 1
. 2020-01-14 08:30:03.790 15 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2020-01-14 08:30:03.790 Type: SSH_FXP_CLOSE, Size: 13, Number: 9732
. 2020-01-14 08:30:03.790 1 requests to fill 1 data gaps were issued.
. 2020-01-14 08:30:03.790 Preserving timestamp [2020-01-14T07:28:54.000Z]
. 2020-01-14 08:30:03.790 Transfer done: '/CRC_APP_APPAUDIT/ToCopy/Audit_PIIWCCH101P_20200114_073001.log' => 'D:\AppTeam\eTRSLogs\AuditLogs\ToProcess\Audit_PIIWCCH101P_20200114_073001.log' [34000]

Using WinSCP 5.13.7 on windows server 2016 standard

Regards,
Gary

Reply with quote

Advertisement

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

Re: File content is missing/truncated during GET

Please post a complete session log file on Debug 1 level.
Can you download a complete file using any other SFTP client?

Reply with quote

garyvoo
Joined:
Posts:
11
Location:
Singapore

Hi Martin,
May I know how do get a complete session log file on Debug 1 level?

And no, I don't think I am able to use different SFTP clients as this is used by the company.

Reply with quote

garyvoo

I did some research and found that during the transfer some of the files are not complete.

I also notice the file size is capped at 34kb. Any files larger than 34kb will be truncated. I also attached the screenshot of the transfer session. Hope this information helps.

Reply with quote

Advertisement

garyvoo
Joined:
Posts:
11
Location:
Singapore

Hi Martin,

I found the issue which is the transfer mode Text(ASCII) and Binary. Originally WinSCP transfer mode was set to binary which caused the truncation in the files, but after I change to text the files are able to transfer complete. May I know why is the binary file failed? All of my files are text files.

Reply with quote

Advertisement

You can post new topics in this forum