Failed to calculate dst hash

What is the problem you are having with rclone?

I can't copy files to a Synology via sftp
I premise that with an old version of rclone I could do it.
now i did the update and i cant do it anymore

Run the command 'rclone version' and share the full output of the command.

rclone v1.65.2
- os/version: Microsoft Windows 11 Pro 23H2 (64 bit)
- os/kernel: 10.0.22631.3155 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.21.6
- go/linking: static
- go/tags: cmount

Which cloud storage system are you using?

I'm trying to copy data to a Synology NAS

The command you were trying to run

./rclone.exe copy D:\TEST Crono:Crono/RAW

Please run 'rclone config redacted' and share the full output.

[Crono]
type = sftp
host = XXX
user = XXX
pass = XXX
shell_type = unix
md5sum_command = md5sum
sha1sum_command = sha1sum

A log from the command that you were trying to run with the -vv flag

2024/03/01 11:56:21 DEBUG : rclone: Version "v1.65.2" starting with parameters ["C:\\Users\\mescs\\Rclone\\rclone.exe" "-vv" "copy" "D:\\TEST" "Crono:Crono/RAW"]
2024/03/01 11:56:21 DEBUG : Creating backend with remote "D:\\TEST"
2024/03/01 11:56:21 DEBUG : Using config file from "C:\\Users\\mescs\\AppData\\Roaming\\rclone\\rclone.conf"
2024/03/01 11:56:21 DEBUG : fs cache: renaming cache item "D:\\TEST" to be canonical "//?/D:/TEST"
2024/03/01 11:56:21 DEBUG : Creating backend with remote "Crono:Crono/RAW"
2024/03/01 11:56:22 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: New connection 141.108.46.13:51238->141.108.4.25:22 to "SSH-2.0-OpenSSH_8.2"
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Shell type "unix" from config
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Relative path resolved to "/Crono/RAW"
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Using root directory "/Crono/RAW"
2024/03/01 11:56:23 DEBUG : test.rtf: Need to transfer - File not found at Destination
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Waiting for checks to finish
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Waiting for transfers to finish
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Shell path "/Crono/RAW/test.rtf.cogejiw1.partial"
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Running remote command: md5sum /Crono/RAW/test.rtf.cogejiw1.partial
2024/03/01 11:56:23 ERROR : test.rtf.cogejiw1.partial: Failed to calculate dst hash: failed to calculate md5 hash: failed to run "md5sum /Crono/RAW/test.rtf.cogejiw1.partial": md5sum: /Crono/RAW/test.rtf.cogejiw1.partial: No such file or directory: Process exited with status 1
2024/03/01 11:56:23 ERROR : test.rtf.cogejiw1.partial: corrupted on transfer: md5 hash differ "f0dd4d11a78f064d762b8b529afdd5e1" vs ""
2024/03/01 11:56:23 INFO  : test.rtf.cogejiw1.partial: Removing failed copy
2024/03/01 11:56:23 ERROR : Attempt 1/3 failed with 2 errors and: corrupted on transfer: md5 hash differ "f0dd4d11a78f064d762b8b529afdd5e1" vs ""
2024/03/01 11:56:23 DEBUG : test.rtf: Need to transfer - File not found at Destination
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Waiting for checks to finish
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Waiting for transfers to finish
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Shell path "/Crono/RAW/test.rtf.canefip2.partial"
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Running remote command: md5sum /Crono/RAW/test.rtf.canefip2.partial
2024/03/01 11:56:23 ERROR : test.rtf.canefip2.partial: Failed to calculate dst hash: failed to calculate md5 hash: failed to run "md5sum /Crono/RAW/test.rtf.canefip2.partial": md5sum: /Crono/RAW/test.rtf.canefip2.partial: No such file or directory: Process exited with status 1
2024/03/01 11:56:23 ERROR : test.rtf.canefip2.partial: corrupted on transfer: md5 hash differ "f0dd4d11a78f064d762b8b529afdd5e1" vs ""
2024/03/01 11:56:23 INFO  : test.rtf.canefip2.partial: Removing failed copy
2024/03/01 11:56:23 ERROR : Attempt 2/3 failed with 2 errors and: corrupted on transfer: md5 hash differ "f0dd4d11a78f064d762b8b529afdd5e1" vs ""
2024/03/01 11:56:23 DEBUG : test.rtf: Need to transfer - File not found at Destination
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Waiting for checks to finish
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Waiting for transfers to finish
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Shell path "/Crono/RAW/test.rtf.yadukoy0.partial"
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Running remote command: md5sum /Crono/RAW/test.rtf.yadukoy0.partial
2024/03/01 11:56:23 ERROR : test.rtf.yadukoy0.partial: Failed to calculate dst hash: failed to calculate md5 hash: failed to run "md5sum /Crono/RAW/test.rtf.yadukoy0.partial": md5sum: /Crono/RAW/test.rtf.yadukoy0.partial: No such file or directory: Process exited with status 1
2024/03/01 11:56:23 ERROR : test.rtf.yadukoy0.partial: corrupted on transfer: md5 hash differ "f0dd4d11a78f064d762b8b529afdd5e1" vs ""
2024/03/01 11:56:23 INFO  : test.rtf.yadukoy0.partial: Removing failed copy
2024/03/01 11:56:23 ERROR : Attempt 3/3 failed with 2 errors and: corrupted on transfer: md5 hash differ "f0dd4d11a78f064d762b8b529afdd5e1" vs ""
2024/03/01 11:56:23 INFO  :
Transferred:      121.573 KiB / 121.573 KiB, 100%, 0 B/s, ETA -
Errors:                 2 (retrying may help)
Elapsed time:         2.4s

2024/03/01 11:56:23 DEBUG : 14 go routines active
2024/03/01 11:56:23 DEBUG : sftp://cobbs@141.108.4.25:22/Crono/RAW: Closing 1 unused connections
2024/03/01 11:56:23 Failed to copy with 2 errors: last error was: corrupted on transfer: md5 hash differ "f0dd4d11a78f064d762b8b529afdd5e1" vs ""

Synology sftp has its quirks. Try --sftp-path-override

most likely you do not have /Crono/RAW directory on your NAS but something like /Volume2/Crono/RAW. md5sum command is run server side and has to operate on real path not sftp "virtual" ones.

1 Like

perfect works!
just to understand is this something that changed recently on rclone?

1 Like

Good it works.

IMO it was always needed with Synology... Maybe before you were not checking hashes?

Last time this part of code was changed:

Support dynamic --sftp-path-override (nielash)

But I do not see how it would affect your case.

it seems to me that the command I was giving is the same.
the version from before was pretty old '21/'22
anyway thank you very much!!!!!

OK - then all is possible... Maybe it was rclone not checking hashes in the past?

To find exact reason it would require git bisect to identify exact commit which changed this behaviour. But I do not think it would bring any value.

I agree with you .
The important thing is that it works now :slight_smile:

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