rclone: Onedrive: Error on writing data in serve mode with webdav

What is the problem you are having with rclone?

Because my NAS (Synology) does not support OneDrive for storing backups (HyperBackup), i want use rclone as a “proxy” for storing backup data because the backup software does support webdav. For that I start serve webdav with:

rclone serve webdav --addr 127.0.0.1:8090 onedrive:

So far, i works for a time but then I got a error from rclone:

2019/04/24 21:16:08 ERROR : Hyper Backup/nas-h01.hbk/Pool/0/0/156.bucket.2: Failed to copy: invalidRange: fragmentOverlap: The uploaded fragment overlaps with data that has already been received.
2019/04/24 21:16:08 ERROR : Hyper Backup/nas-h01.hbk/Pool/0/0/156.bucket.2: WriteFileHandle.New Rcat failed: invalidRange: fragmentOverlap: The uploaded fragment overlaps with data that has already been received.

What is your rclone version (output from rclone version)

rclone v1.46

  • os/arch: linux/amd64
  • go version: go1.11.5

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

Synology OS (Linux 4.4.59+), but I can reproduce this at Debian 9/x64.

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

Onerive

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

rclone serve webdav --addr 127.0.0.1:8090 onedrive:

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

2019/04/24 21:16:08 ERROR : Hyper Backup/nas-h01.hbk/Pool/0/0/156.bucket.2: Failed to copy: invalidRange: fragmentOverlap: The uploaded fragment overlaps with data that has already been received.
2019/04/24 21:16:08 ERROR : Hyper Backup/nas-h01.hbk/Pool/0/0/156.bucket.2: WriteFileHandle.New Rcat failed: invalidRange: fragmentOverlap: The uploaded fragment overlaps with data that has already been received.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@ncw, I just wanted to thank you so much for your great work! You make this world a better place! rclone is absolutely great. And I am so sorry, that I did not yet have the time to test your release. At that time I got the error, I was only testing rclone and deleted everything as onedrive was to unreliable. IBut I plan to recreate the setup and test in the next days. Thanks again for your creat work and support!

So what it looks like happened is that we tried to put a 10MB chunk and got a 500 error for some reason.

However when we retried it we got a “416 Requested Range Not Satisfiable” which probably means the server got the chunk already.

This is covered in the docs

On failures when the client sent a fragment the server had already received, the server will respond with HTTP 416 Requested Range Not Satisfiable. You can request upload status to get a more detailed list of missing ranges.

So we could assume if we get a 416 on a retry that the server got it already and to skip the chunk.

Perhaps better would be to get the upload status to work out where we are. Our hands are somewhat tied here - if the server is missing stuff that isn’t in the current chunk we’ll have to abort.

What do you think @Cnly ?

I’ve had a willing tester for this patch, and I’m confident it is fixed now. It missed 1.50.0 but I’ll release it in 1.50.1 at some point.