Yandex Disk: 400 Bad Request

What is the problem you are having with rclone?

Big files (ex. >5 GB) fail to upload with this error.

Tried
yandex > crypt > chunker
yandex > chunker > crypt
ans it's all the same.

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

rclone v1.62.2

  • os/version: Microsoft Windows 8.1 Enterprise (64 bit)
  • os/kernel: 6.3.9600.20721 Build 9600.20721.20721 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.20.2
  • go/linking: static
  • go/tags: cmount

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

Yandex Disk

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

rclone.exe mount --network-mode --vfs-cache-mode full testcrypt: \\testcrypt --transfers=1 --timeout 60m -vv

The rclone config contents with secrets removed.

[test]
type = yandex

[testcrypt]
type = crypt
remote = test
filename_encoding = base32768

A log from the command with the -vv flag

2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x0
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x0
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x1
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x1
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x0
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x0
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x0
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x1
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x1
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x0
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x0
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x0
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x1
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x1
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Statfs:
2023/05/28 06:40:15 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:538181632 Bfree:464592956 Bavail:464592956 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x0
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x0
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x0
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x1
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x1
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x0
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x0
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x0
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x0
2023/05/28 06:40:15 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2023/05/28 06:40:15 DEBUG : /: >Getattr: errc=0
2023/05/28 06:40:15 DEBUG : /: Opendir:
2023/05/28 06:40:15 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2023/05/28 06:40:15 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2023/05/28 06:40:15 DEBUG : /: >Opendir: errc=0, fh=0x1
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x1
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:15 DEBUG : /: Releasedir: fh=0x0
2023/05/28 06:40:15 DEBUG : /: >Releasedir: errc=0
2023/05/28 06:40:20 DEBUG : Couldn't decode error response: EOF
2023/05/28 06:40:20 DEBUG : pacer: Reducing sleep to 15ms
2023/05/28 06:40:20 ERROR : test.tmp: Failed to copy: [400 - ]  (400 Bad Request)
2023/05/28 06:40:20 ERROR : test.tmp: vfs cache: failed to upload try #2, will retry in 20s: vfs cache: failed to transfer file from cache to remote: [400 - ]  (400 Bad Request)

Did you authorize it? Your rclone.conf is missing a few fields here.

That has a typo and should be

remote = test:

Instead of a mount, just copy a file

rclone copy somefile testcrypt: -vv

Only secret fields are missing. Assume that everything else works fine.

There are no issues here, I just shortened it to make the path and the method more obvious.

Here is the log with relevant details:

2023/05/28 15:01:45 INFO  :
Transferred:       11.144 GiB / 12.274 GiB, 91%, 10.328 MiB/s, ETA 1m52s
Transferred:            0 / 1, 0%
Elapsed time:      21m0.3s
Transferring:
 *                          test.tmp: 82% /6.303Gi, 9.523Mi/s, 2m1s

2023/05/28 15:02:18 DEBUG : pacer: low level retry 1/10 (error Put "https://uploader47o.disk.yandex.net:443/upload-target/*": write tcp *:12455->*:443: wsasend: An existing connection was forcibly closed by the remote host.)
2023/05/28 15:02:18 DEBUG : pacer: Rate limited, increasing sleep to 20ms
2023/05/28 15:02:45 INFO  :
Transferred:       11.199 GiB / 12.274 GiB, 91%, 10.328 MiB/s, ETA 1m46s
Transferred:            0 / 1, 0%
Elapsed time:      22m0.3s
Transferring:
 *                          test.tmp: 82% /6.303Gi, 515.871Ki/s, 36m24s

2023/05/28 15:02:49 DEBUG : Couldn't decode error response: EOF
2023/05/28 15:02:49 DEBUG : pacer: Reducing sleep to 15ms
2023/05/28 15:02:49 ERROR : test.tmp: Failed to copy: [400 - ]  (400 Bad Request)
2023/05/28 15:02:49 ERROR : Attempt 3/3 failed with 1 errors and: [400 - ]  (400 Bad Request)
2023/05/28 15:02:49 INFO  :
Transferred:       11.200 GiB / 11.200 GiB, 100%, 10.328 MiB/s, ETA 0s
Errors:                 1 (retrying may help)
Elapsed time:      22m4.7s

2023/05/28 15:02:49 DEBUG : 2 go routines active
2023/05/28 15:02:49 Failed to copy: [400 - ]  (400 Bad Request)

I don't know what that means. What's your actual config file look like with the keys redacted? I can't assume anything as I can't see your exact configuration.

What's the actual config then? I can't figure out what I'm supposed to assume to be right or working as you are asking for help so without the specifics, we can guess but that's not really fun.

Looks like a firewall/AV or something blocking your request if we assume all your configuration is correct.

[test]
type = yandex
token = *redacted*

I have no active/aggressive firewall/AV. Windows Firewall is disabled. I'm able to transfer tons of other files just fine with mount. Only big files fail.

Upload through web works fine.

I now confirmed that these scenarios also fail with the same error:
yandex > crypt > chunker
yandex > chunker > crypt
yandex > chunker

Wanted to create a separate thread but it appears something is wrong in the yandex module after all. Whenever a new chunk is uploaded I can see it properly through website view. When the pacer: low level retry thing happens, all chunks of current file that were already uploaded get removed from cloud (moved into recycle bin) and a new attempt for current file starts from the scratch. Pretty sure it shouldn't work like this.

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