Rclone serve restic (Post request rcat error: RequestCanceled)

What is the problem you are having with rclone?

Hello, I'm stuck in the setup of a restic server with rclone and OVH S3 as storage backend.

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

rclone v1.65.0
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-89-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.4
- go/linking: static
- go/tags: none

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

I'm using an S3 storage from OVH (https://s3.rbx.io.cloud.ovh.net)

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

I'm running rclone as a systemd service like so (/etc/systemd/system/rclone-server.service) :

[Unit]
Description=Rclone restic server
After=network-online.target

[Service]
User=www-data
Group=www-data
Type=simple
ExecStartPre=/bin/sleep 10
ExecStart=rclone serve restic OVH_S3:restic-bucket \
    --config /var/www/.config/rclone/rclone.conf \
    --addr 0.0.0.0:8080 \
    --append-only \
    --log-level DEBUG --log-file /var/log/rclone/rclone.log \
RestartSec=5
LimitNOFILE=infinity

'rclone config redacted'

[OVH_S3]
type = s3
provider = Other
env_auth = false
access_key_id = XXX
secret_access_key = XXX
endpoint = https://s3.rbx.io.cloud.ovh.net
acl = private
region = rbx
location_constraint = rbx
### Double check the config for sensitive info before posting publicly

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

2023/12/04 16:20:14 ERROR : bucket/data/b1/b14dfbe1dcf1a293f04a8a9e2708a1cb099979dfe28af83f3606bb593c351c72: Post request rcat error: RequestCanceled: request context canceled
caused by: context canceled
2023/12/04 16:20:18 ERROR : bucket/data/a5/a5eadd947042a10ade75b2229f7169829dd31edf04a190af659fd5ba7e975b65: Post request put error: RequestCanceled: request context canceled
caused by: context canceled
2023/12/04 16:20:18 ERROR : bucket/data/a5/a5eadd947042a10ade75b2229f7169829dd31edf04a190af659fd5ba7e975b65: Post request rcat error: RequestCanceled: request context canceled
caused by: context canceled
2023/12/04 16:20:18 ERROR : bucket/data/b1/b14dfbe1dcf1a293f04a8a9e2708a1cb099979dfe28af83f3606bb593c351c72: Post request put error: RequestCanceled: request context canceled
caused by: context canceled
2023/12/04 16:20:18 ERROR : bucket/data/b1/b14dfbe1dcf1a293f04a8a9e2708a1cb099979dfe28af83f3606bb593c351c72: Post request rcat error: RequestCanceled: request context canceled
caused by: context canceled
2023/12/04 16:20:22 ERROR : bucket/data/b1/b14dfbe1dcf1a293f04a8a9e2708a1cb099979dfe28af83f3606bb593c351c72: Post request put error: RequestCanceled: request context canceled
caused by: context canceled
2023/12/04 16:20:22 ERROR : bucket/data/b1/b14dfbe1dcf1a293f04a8a9e2708a1cb099979dfe28af83f3606bb593c351c72: Post request rcat error: RequestCanceled: request context canceled
caused by: context canceled
2023/12/04 16:20:23 ERROR : bucket/data/a5/a5eadd947042a10ade75b2229f7169829dd31edf04a190af659fd5ba7e975b65: Post request put error: RequestCanceled: request context canceled
caused by: context canceled
2023/12/04 16:20:23 ERROR : bucket/data/a5/a5eadd947042a10ade75b2229f7169829dd31edf04a190af659fd5ba7e975b65: Post request rcat error: RequestCanceled: request context canceled
caused by: context canceled
^C2023/12/04 16:20:23 INFO  : Signal received: interrupt
2023/12/04 16:20:23 INFO  :
Transferred:        3.828 MiB / 3.828 MiB, 100%, 173.546 KiB/s, ETA 0s
Errors:                32 (retrying may help)
Transferred:            4 / 4, 100%
Elapsed time:        45.3s

2023/12/04 16:20:23 DEBUG : 7 go routines active
2023/12/04 16:20:23 Failed to restic with 32 errors: last error was: RequestCanceled: request context canceled
caused by: context canceled
2023/12/04 16:20:23 INFO  : Exiting...

And what is the command causing errors you listed?

/usr/local/bin/restic backup --repository-file /home/restic/.restic_repo --password-file /home/restic/.restic_password /etc /data

Does adding --verbose=2 to it produces anything more useful/meaningful?

No nothing special, actually it works in interactive mode with verbose

restic is started within a one line cronjob. As I said in interactive mode it works. Even with SHELL=/bin/bash at the top of the file it fails.

Solution : dedicated file script with shebang #!/bin/bash.

1 Like

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