While rclone copying large files md5sum failed with exit status

What is the problem you are having with rclone?

when we are copying large file size around 56GB or 100GB md5sum checksum failed with status exit .
is there any other checks we can use using rclone copy that ensure us data copied gracefully / correctly

What is your rclone version (output from rclone version)

rclone v1.56.0

Which OS you are using and how many bits (eg Windows 7, 64 bit)

  • os/version: redhat 7.9 (64 bit)
  • os/kernel: 3.10.0-1160.36.2.el7.x86_64 (x86_64)

Which cloud storage system are you using? (eg Google Drive)

Local server copy using SFTP

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Paste command here

rclone copy  --sftp-host=remote_server :sftp:/datasync --sftp-user=minio --sftp-pass='' /datasync --log-file=/var/log/rclone/rclone_pull.log   -v


#### The rclone config contents with secrets removed.  
<!--  You should use 3 backticks to begin and end your paste to make it readable.   -->

Paste config here

rclone copying data using SFTP from remote server without any Specific config

#### A log from the command with the `-vv` flag  
<!-- You should use 3 backticks to begin and end your paste to make it readable.  Or use a service such as https://pastebin.com or https://gist.github.com/   -->

Paste log here

2021/10/04 13:39:07 DEBUG : sftp cmd = /edwdata/xfer_data/mozart/out/my_file_mid_20210929.csv
2021/10/04 13:39:07 DEBUG : my_file_mid_20210929.csv: Failed to calculate md5 hash: wait:remote commadn exited without exit status or exit signal ( )
2021/10/04 13:52:58 INFO  : my_file_large_20210929.csv: Multi-thread Copied (new)
2021/10/04 13:52:58 INFO  :
Transferred:       61.098Gi / 61.098 GiByte, 100%, 26.825 KiByte/s, ETA 0s
Transferred:            3 / 3, 100%
Elapsed time:      16m4.1s

2021/10/04 13:52:58 DEBUG : 3 go routines active

hello,

the exit code is the recommended way to check for errors.
is there some reason that does not fit your use-case?

another option, which i use is:
after each run of a rclone command, i have a python script that scans the debug log and looks for certain text.

yes , I agree , exit code , but why rclone didnt complete the checksum for large files , if this not fit in rclone in-built timing as large file taking long time for checksum is there any other checks we can also add to ensure the data copied gracefully without relying on checksum , this needed our architect is stuck on this error only

can you post the full debug log?

This looks like it is the md5sum taking so long the ssh session times out.

Try setting --timeout 1h and see if that helps.

here is full logs without timout flag .

2021/10/05 16:18:39 DEBUG : Creating backend with remote ":sftp:incoming/large_file_56GB"
2021/10/05 16:18:39 DEBUG : :sftp: detected overridden config - adding "{11qEL}" suffix to name
2021/10/05 16:18:39 DEBUG : Using config file from "/opt/SP/minio/.config/rclone/rclone.conf"
2021/10/05 16:18:39 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: New connection 198.19.137.134:39330->remote_server:22 to "SSH-2.0-OpenSSH_5.3"
2021/10/05 16:18:40 DEBUG : fs cache: adding new entry for parent of ":sftp:incoming/large_file_56GB", ":sftp{11qEL}:incoming"
2021/10/05 16:18:40 DEBUG : Creating backend with remote "/opt/SP/minio/datasync/demo1"
2021/10/05 16:18:40 DEBUG : large_file_56GB: Sizes differ (src 60129542144 vs dst 56036392960)
2021/10/05 16:18:40 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: checking "md5sum" command: "d41d8cd98f00b204e9800998ecf8427e -"
2021/10/05 16:18:40 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: checking "sha1sum" command: "da39a3ee5e6b4b0d3255bfef95601890afd80709 -"
2021/10/05 16:18:40 DEBUG : Saving config "md5sum_command" in section ":sftp" of the config file
2021/10/05 16:18:40 NOTICE: Can't save config "md5sum_command" for on the fly backend ":sftp"
2021/10/05 16:18:40 DEBUG : Saving config "sha1sum_command" in section ":sftp" of the config file
2021/10/05 16:18:40 NOTICE: Can't save config "sha1sum_command" for on the fly backend ":sftp"
2021/10/05 16:18:50 DEBUG : large_file_56GB: Starting multi-thread copy with 4 parts of size 14Gi
2021/10/05 16:18:50 DEBUG : large_file_56GB: multi-thread copy: stream 4/4 (45097156608-60129542144) size 14Gi starting
2021/10/05 16:18:50 DEBUG : large_file_56GB: multi-thread copy: stream 3/4 (30064771072-45097156608) size 14Gi starting
2021/10/05 16:18:50 DEBUG : large_file_56GB: multi-thread copy: stream 1/4 (0-15032385536) size 14Gi starting
2021/10/05 16:18:50 DEBUG : large_file_56GB: multi-thread copy: stream 2/4 (15032385536-30064771072) size 14Gi starting
2021/10/05 16:18:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: New connection 198.19.137.134:39388->remote_server:22 to "SSH-2.0-OpenSSH_5.3"
2021/10/05 16:18:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: New connection 198.19.137.134:39390->remote_server:22 to "SSH-2.0-OpenSSH_5.3"
2021/10/05 16:18:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: New connection 198.19.137.134:39392->remote_server:22 to "SSH-2.0-OpenSSH_5.3"
2021/10/05 16:19:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: Not closing 4 unused connections as 4 transfers in progress
2021/10/05 16:20:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: Not closing 4 unused connections as 4 transfers in progress
2021/10/05 16:21:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: Not closing 4 unused connections as 4 transfers in progress
2021/10/05 16:22:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: Not closing 4 unused connections as 4 transfers in progress
2021/10/05 16:23:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: Not closing 4 unused connections as 4 transfers in progress
2021/10/05 16:24:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: Not closing 4 unused connections as 4 transfers in progress
2021/10/05 16:25:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: Not closing 4 unused connections as 4 transfers in progress
2021/10/05 16:26:20 DEBUG : large_file_56GB: multi-thread copy: stream 1/4 (0-15032385536) size 14Gi finished
2021/10/05 16:26:31 DEBUG : large_file_56GB: multi-thread copy: stream 3/4 (30064771072-45097156608) size 14Gi finished
2021/10/05 16:26:32 DEBUG : large_file_56GB: multi-thread copy: stream 2/4 (15032385536-30064771072) size 14Gi finished
2021/10/05 16:26:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: Not closing 4 unused connections as 1 transfers in progress
2021/10/05 16:27:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: Not closing 4 unused connections as 1 transfers in progress
2021/10/05 16:28:50 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: Not closing 4 unused connections as 1 transfers in progress
2021/10/05 16:29:00 DEBUG : large_file_56GB: multi-thread copy: stream 4/4 (45097156608-60129542144) size 14Gi finished
2021/10/05 16:29:00 DEBUG : large_file_56GB: Finished multi-thread copy with 4 parts of size 14Gi
2021/10/05 16:30:00 DEBUG : sftp://minio@remote_server:22/incoming/large_file_56GB: closing 4 unused connections
2021/10/05 16:30:00 DEBUG : sftp cmd = incoming/large_file_56GB
2021/10/05 16:30:00 DEBUG : large_file_56GB: Failed to calculate md5 hash: wait: remote command exited without exit status or exit signal ()
2021/10/05 16:30:52 INFO : large_file_56GB: Multi-thread Copied (replaced existing)
2021/10/05 16:30:52 INFO :
Transferred: 56Gi / 56 GiByte, 100%, 32.341 KiByte/s, ETA 0s
Transferred: 1 / 1, 100%
Elapsed time: 12m13.4s

2021/10/05 16:30:52 DEBUG : 4 go routines active

about the sftp server, is that from minio or what?

I tried with --timeout=1h still same happened

minio is user from which it is copying data from remote linux server

if not minio, then who makes that sftp server, bitvise, rebex for what?

if you copy that same file, using another sftp client, does it upload, does the client perform the checksum?

yes this in built feature in rclone copy using SFTP from remote Linux to Local Linux machine , other plain SFTP doesn't use md5sum by default

sorry, not sure i understand what you wrote.

  • the sftp server, who makes it, Cerberus, openssh, solarwinds or what?
  • does that sftp server support checksum on file uploads?

that server is RHEL 7.9 Linux machine and yes that support md5sum checksum , for smaller size file it is working fine

perhaps try
rclone check source dest --download

Ah, looks like this is the sftp backend tidying up unused connection which it shouldn't do.

Try this fix.

v1.57.0-beta.5681.3df0b2fe1.fix-sftp-timeout on branch fix-sftp-timeout (uploaded in 15-30 mins)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.57

1 Like