Receiving 0 byte files

Advertisement

Berube
Joined:
Posts:
5

Receiving 0 byte files

We have a recurring problem with a script that runs nightly; it works most of the time, but we occasionally get files with no contents. The log from last night is attached; the problem occurred three times last night.

I have noticed something unusual in the logs. When a successful transfer occurs, the log entries contain:
< 2024-07-03 01:20:06.643 150 Opening BINARY mode data connection.
. 2024-07-03 01:20:06.689 Session ID reused
. 2024-07-03 01:20:06.689 Using TLSv1.2, cipher TLSv1.2: ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-GCM-SHA384    TLSv1.2 Kx=ECDH     Au=RSA   Enc=AESGCM(256)            Mac=AEAD
. 2024-07-03 01:20:06.689 TLS connection established
. 2024-07-03 01:20:06.736 Data connection closed
< 2024-07-03 01:20:06.736 226 Transfer complete.
However, when we get a 0 byte file, the "Session ID reused" line is missing:
< 2024-07-03 01:20:06.924 150 Opening BINARY mode data connection.
< 2024-07-03 01:20:07.049 226 Transfer complete.
. 2024-07-03 01:20:07.090 Data connection closed
  • WinSCP_BDS.log (39.61 KB, Private file)

Reply with quote

Advertisement

Guest

Martin can of course look at the log (I can't as I'm just a guest).

But, if you know that the file on the server is indeed not 0 byte, then it makes sense that WinSCP is creating a file but is unable to get bytes into it. This can be from a connection issue such as with networking equipment. However, if WinSCP creates a file before the server gets into the read file loop, and the server has an issue, WinSCP could in theory leave a 0 byte file around.

I'm not looking at the code or anything.

Session resumption involving session id has nothing to do with this.

Reply with quote

Berube
Joined:
Posts:
5

Zero-length files

The files with zero length were:
ym_lims_export_20240703000027.txt
ym_lims_export_20240703000029.txt
ym_lims_export_20240703000031.txt
The original files did have content on the server.

Reply with quote

martin
Site Admin
martin avatar

Re: Zero-length files

Please increase logging level to Debug 2 and post again logs of one successful and one zero transfer.

Reply with quote

Advertisement

Berube
Joined:
Posts:
5

More failures

Attached is the log from last night's transfers with logging at debug 2. Four files failed, those with filenames ending in 31, 32, 37, & 38.
  • WinSCP_BDS.log (55.25 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar

Re: Receiving 0 byte files

I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Reply with quote

Advertisement

You can post new topics in this forum