What is the problem you are having with rclone?
A number of "corrupted on transfer: sizes differ" error messages over past few weeks or more during sync from cloud to local. The problem seems to happen sporadically but I have a particular file which is recurring more frequently right now so I am proceeding to dive deeper into what is going on to see if I can resolve it. I've read other posts here that offer a workaround of --ignore-size
however I would prefer to see if the source of the problem can be determined and resolved so I don't have to loose the intention of that file size check.
In the example log output below the file size is actually 422421 bytes when I inspect it server side either using rclone ls
or cyberduck and when it is successfully downloaded it is 422421 bytes locally. For some reason when it fails a file size of 422438 is found at some point. I've noticed many other occurrences throughout the logs with different file sizes, sometimes the first number found its a little smaller and sometimes a little larger (not a consistent pattern of one or the other).
The file type is a zip file and it is created by our software (a Windows .NET app) running at different location which uploads the file to Rackspace Cloud Files.
Rclone is syncing a local file with the Rackspace Cloud Files container (from cloud to local) and is running in a docker container from an image built "FROM" rclone/rclone:latest
(at the time the image was last built "latest" had 1.57 in it - see below).
Any ideas of what is going on?
What sort of troubleshooting or next step can be taken to see what is happening that would causes this filesize mismatch and flag it as corrupt? As mentioned, I am aware I could just disable the check using --ignore-size
but I would like solve the problem it so I don't have to do that.
Run the command 'rclone version' and share the full output of the command.
inside a Dockerfile FROM rclone/rclone:latest
rclone v1.57.0
- os/version: alpine 3.14.2 (64 bit)
- os/kernel: 4.15.0-161-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.2
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Swift (Rackspace)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone sync --log-file ${LOGS_DIR}/${CONFIG_CODE}.log -v --filter-from ${REMOTE_FILTERS_FILE} ${REMOTE_NAME}:${REMOTE_CONTAINER} ${LOCAL_REMOTE_SYNC_DIR}
The rclone config contents with secrets removed.
[cloudfiles-dfw]
type = swift
auth = https://identity.api.rackspacecloud.com/v2.0
region = DFW
A log from the command with the -vv
flag
This is an excerpt (I purged dozens of successful transfer output to reduce it for this paste) of a log output that shows it failing and then succeeding on the next attempt however the problem occurs often such that all 3 attempts fail often.
2022/08/30 14:00:45 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "sync" "--log-file" "/srv/logs/company_53.log" "-vv" "--filter-from" "/srv/config/pnd.filters" "cloudfiles-dfw:PnD-Company-53-Content" "/srv/data/cloudfiles-dfw/PnD-Company-53-Content"]
2022/08/30 14:00:45 DEBUG : Creating backend with remote "cloudfiles-dfw:PnD-Company-53-Content"
2022/08/30 14:00:45 DEBUG : Using config file from "/config/rclone/rclone.conf"
2022/08/30 14:00:45 DEBUG : Creating backend with remote "/srv/data/cloudfiles-dfw/PnD-Company-53-Content"
2022/08/30 14:00:45 DEBUG : logs: Excluded
2022/08/30 14:00:45 DEBUG : Local file system at /srv/data/cloudfiles-dfw/PnD-Company-53-Content: Waiting for checks to finish
2022/08/30 14:00:45 DEBUG : master/sapb1_itt1.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:45 DEBUG : master/sapb1_itt1.zip: Unchanged skipping
2022/08/30 14:00:45 DEBUG : master/sapb1_obpp.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:45 DEBUG : master/sapb1_obpp.zip: Unchanged skipping
2022/08/30 14:00:45 DEBUG : master/sapb1_obin.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:45 DEBUG : master/sapb1_obin.zip: Unchanged skipping
2022/08/30 14:00:45 DEBUG : master/sapb1_oibq.zip: Modification times differ by 4h35m8s: 2022-08-30 14:24:41 +0000 UTC, 2022-08-30 11:59:49 -0700 PDT
2022/08/30 14:00:45 DEBUG : master/sapb1_oitb.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:45 DEBUG : master/sapb1_oitb.zip: Unchanged skipping
2022/08/30 14:00:45 DEBUG : master/sapb1_oitm.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:45 DEBUG : master/sapb1_oitm.zip: Unchanged skipping
2022/08/30 14:00:45 DEBUG : master/sapb1_owhs.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:45 DEBUG : master/sapb1_owhs.zip: Unchanged skipping
2022/08/30 14:00:45 DEBUG : master/sapb1_oibq.zip: md5 = 50c7485b30eca6fa50ab216aeb861ce3 (Swift container PnD-Company-53-Content)
2022/08/30 14:00:45 DEBUG : master/sapb1_oibq.zip: md5 = 9012ad811fdece9023ee8fcf5aa778f6 (Local file system at /srv/data/cloudfiles-dfw/PnD-Company-53-Content)
2022/08/30 14:00:45 DEBUG : master/sapb1_oibq.zip: md5 differ
2022/08/30 14:00:45 ERROR : master/sapb1_oibq.zip: corrupted on transfer: sizes differ 422438 vs 422421
2022/08/30 14:00:45 INFO : master/sapb1_oibq.zip: Removing failed copy
2022/08/30 14:00:46 DEBUG : Local file system at /srv/data/cloudfiles-dfw/PnD-Company-53-Content: Waiting for transfers to finish
2022/08/30 14:00:46 ERROR : Local file system at /srv/data/cloudfiles-dfw/PnD-Company-53-Content: not deleting files as there were IO errors
2022/08/30 14:00:46 ERROR : Local file system at /srv/data/cloudfiles-dfw/PnD-Company-53-Content: not deleting directories as there were IO errors
2022/08/30 14:00:46 ERROR : Attempt 1/3 failed with 1 errors and: corrupted on transfer: sizes differ 422438 vs 422421
2022/08/30 14:00:46 DEBUG : logs: Excluded
2022/08/30 14:00:46 DEBUG : master/sapb1_obin.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:46 DEBUG : master/sapb1_obin.zip: Unchanged skipping
2022/08/30 14:00:46 DEBUG : master/sapb1_obpp.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:46 DEBUG : master/sapb1_obpp.zip: Unchanged skipping
2022/08/30 14:00:46 DEBUG : master/sapb1_itt1.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:46 DEBUG : master/sapb1_itt1.zip: Unchanged skipping
2022/08/30 14:00:46 DEBUG : master/sapb1_oitm.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:46 DEBUG : master/sapb1_oitm.zip: Unchanged skipping
2022/08/30 14:00:46 DEBUG : master/sapb1_oitb.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:46 DEBUG : master/sapb1_oitb.zip: Unchanged skipping
2022/08/30 14:00:46 DEBUG : master/sapb1_oibq.zip: md5 = 9012ad811fdece9023ee8fcf5aa778f6 OK
2022/08/30 14:00:46 INFO : master/sapb1_oibq.zip: Copied (new)
2022/08/30 14:00:46 DEBUG : Local file system at /srv/data/cloudfiles-dfw/PnD-Company-53-Content: Waiting for checks to finish
2022/08/30 14:00:46 DEBUG : master/sapb1_owhs.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2022/08/30 14:00:46 DEBUG : master/sapb1_owhs.zip: Unchanged skipping
2022/08/30 14:00:46 DEBUG : Local file system at /srv/data/cloudfiles-dfw/PnD-Company-53-Content: Waiting for transfers to finish
2022/08/30 14:00:46 DEBUG : Waiting for deletions to finish
2022/08/30 14:00:46 ERROR : Attempt 2/3 succeeded
2022/08/30 14:00:46 INFO :
Transferred: 825.041 KiB / 825.041 KiB, 100%, 0 B/s, ETA -
Checks: 183 / 183, 100%
Transferred: 1 / 1, 100%
Elapsed time: 1.3s
2022/08/30 14:08:45 DEBUG : 26 go routines active