Failed to read rc response: 500 Internal Server Error

What is the problem you are having with rclone?

Rclone cannot mount my cloud storage anymore (pcloud, google drive, dropbox, OneDrive).

I am always using the same script to mount my drives (more than a year). All mounts now fail with the same error.

2022/04/18 22:01:31 Failed to rc: Failed to read rc response: 500 Internal Server Error: {
        "error": "fusermount: exit status 1",
        "input": {
                "fs": "pcloud:",
                "mountPoint": "/data/pcloud"
        },
        "path": "mount/mount",
        "status": 500
}

Recently 3 things did change:

  • Another internet provider
  • My host OS has another linux kernel version (QNAP nas)
  • I have a new rclone version (docker v1.58.0).

I already tried older versions and I did refesh my tokens. So, I suspect the linux kernel version might have to do with this problem. Any clue what steps I can take to resolve this?

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

rclone v1.58.0
- os/version: alpine 3.15.1 (64 bit)
- os/kernel: 5.10.60-qnap (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18
- go/linking: static
- go/tags: none

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

pcloud, Google drive, Dropbox, Onedrive

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

docker exec rclone rclone rc options/set --json '{"main": { "Transfers": 4 }, "vfs": {"UID": '$PUID', "GID": '$PGID', "Umask": 23, "CacheMode": 3}, "mount": {"AllowOther": true}}' $AUTH
docker exec rclone rclone rc mount/mount fs=pcloud: mountPoint=/data/pcloud $AUTH

hello,
have you searched the forum for that error as there are many topics about it
for example,
https://forum.rclone.org/t/onedrive-error-certificate-is-not-valid-for-any-names-but-wanted-to-match-api-onedrive-com/30232/9

Thanks for the quick response. Yes I've tried to search for this problem, but no solution so far.

When I try another machine on the same network (Ubuntu), it works. So I guess it is not a DNS problem.

you seem to have changed a number of things at the same time.
i would suggest to simply your test case.

first, test using the older version of rclone that worked.
that should help eliminate the idea that there is a rclone bug.

second, test without docker,
run the rclone commands direct on the command line.

The older versions of rclone also do not work anymore. As I just upgraded this machine, I suspect it has to do with the kernel version.

However, i can mount the cloud space without the rc command, like this:

rclone mount pcloud: /data/pcloud

I cannot mount it with the rc command anymore (which worked before), like this:

AUTH="--rc-user=$USERNAME --rc-pass=$PASSWORD"
rclone rc options/set $AUTH
rclone rc mount/mount fs=pcloud: mountPoint=/data/pcloud $AUTH

Then I get the error as described above.

post a full set of debug logs.

That is with the --vv flag, right? It hardly shows more info.

2022/04/19 21:52:08 DEBUG : rclone: Version "v1.58.0" starting with parameters ["rclone" "rc" "mount/mount" "fs=pcloud:" "mountPoint=/data/pcloud" "-vv" "--rc-user=<hidden>" "--rc-pass=<hidden>"]
2022/04/19 21:52:08 DEBUG : 4 go routines active
2022/04/19 21:52:08 Failed to rc: Failed to read rc response: 500 Internal Server Error: {
        "error": "fusermount: exit status 1",
        "input": {
                "fs": "pcloud:",
                "mountPoint": "/data/pcloud"
        },
        "path": "mount/mount",
        "status": 500
}

yes, -vv.

please post the debug log for that. post the debug log for any command you run.

and instead of mount/mount, run a simple command such as
https://rclone.org/rc/#rc-noop

{}
2022/04/19 22:13:39 DEBUG : rclone: Version "v1.58.0" starting with parameters ["rclone" "rc" "options/set" "-vv" "--rc-user=rclone" "--rc-pass=rclone"]
2022/04/19 22:13:39 DEBUG : 4 go routines active
{}
2022/04/19 22:13:39 DEBUG : rclone: Version "v1.58.0" starting with parameters ["rclone" "rc" "rc/noop" "-vv" "--rc-user=rclone" "--rc-pass=rclone"]
2022/04/19 22:13:39 DEBUG : 4 go routines active

The web interface is running fine (at port 5572), no issues with that.

not an expert with remote control features of rclone,
as i understand it, rclone rc is to be used against an already running instance of rclone.

so this works, using rclone rcd

for example,

rclone rcd --rc-no-auth
rclone rc mount/mount fs=remote: mountPoint=/home/user01/rclone/mountpoints/remote

Thanks for the suggestion. Unfortunately, I get exactly the same error using it. Also, when I try other cloud drives (google drive, one drive, dropbox)

Sorry, I missed a line in my original script and now I have proper logging.

./rclone rcd -vv --log-file=log.txt --rc-web-gui --rc-web-gui-no-open-browser --cache-dir /share/cloud/user/.cache --rc-addr :5572 $AUTH &
sleep 5

./rclone rc options/set --json '{"main": {"Transfers": 4}, "vfs" : {"UID": '$PUID', "GID": '$PGID', "Umask": 23, "CacheMode": 3, "CacheMaxAge": 31622400000000000, "DirCacheTime": 31536000000000000}, "mount": {"AllowOther": true,"}}' $AUTH
./rclone rc mount/mount fs=pcloud: mountPoint=/share/cloud/user/pcloud $AUTH

And this is the logfile

2022/04/20 12:25:38 DEBUG : rclone: Version "v1.58.0" starting with parameters ["./rclone" "rcd" "-vv" "--log-file=log.txt" "--rc-web-gui" "--rc-web-gui-no-open-browser" "--cache-dir" "/share/cloud/user/.cache" "--rc-addr" ":5572" "--rc-user=<hidden>" "--rc-pass=<hidden>"]
2022/04/20 12:25:38 DEBUG : Current tag: v2.0.4, Release tag: v2.0.5
2022/04/20 12:25:38 INFO  : A release (v2.0.5) for gui is present at https://github.com/rclone/rclone-webui-react/releases/download/v2.0.5/currentbuild.zip. Use --rc-web-gui-update to update. Your current version is (v2.0.4)
2022/04/20 12:25:38 NOTICE: Web GUI exists. Update skipped.
2022/04/20 12:25:38 NOTICE: Serving Web GUI
2022/04/20 12:25:38 INFO  : Using --user <hidden> --pass XXXX as authenticated user
2022/04/20 12:25:38 NOTICE: Serving remote control on http://[::]:5572/
2022/04/20 12:25:38 DEBUG : login_token "<hidden>"
2022/04/20 12:25:38 NOTICE: Web GUI is not automatically opening browser. Navigate to http://rclone:rclone@[::]:5572/?login_token=<hidden> to use.
2022/04/20 12:25:43 DEBUG : rc: "mount/mount": with parameters map[fs:pcloud: mountPoint:/share/cloud/user/pcloud]
2022/04/20 12:25:43 DEBUG : Creating backend with remote "pcloud:"
2022/04/20 12:25:43 DEBUG : Using config file from "/share/system/admin/.config/rclone/rclone.conf"
2022/04/20 12:25:43 INFO  : pcloud root '': poll-interval is not supported by this remote
2022/04/20 12:25:43 NOTICE: pcloud root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
2022/04/20 12:25:43 DEBUG : pcloud root '': Mounting on "/share/cloud/user/pcloud"
2022/04/20 12:25:43 mount helper error: fusermount: mount failed: Invalid argument
2022/04/20 12:25:43 mount FAILED: fusermount: exit status 1
2022/04/20 12:25:43 ERROR : rc: "mount/mount": error: fusermount: exit status 1

in the latest debug log,
pcloud root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
but your mount command is set to a cache "CacheMode": 3
that does not look correct?

should vfs be vfsOpt and mount be mountOpt?

the mount commands are not the same, are you comparing two different commands?
for example,
for the command that worked, used /data/pcloud
for the command that did not work, used /share/cloud/user/pcloud

and for testing, run the simplest commands possible, remove all optional flags.
need to simply this as much as possible.
--- do not use json, just adds an unneeded level of complexity
--- no need for CacheMode, --cache-dir and so on.
--- run a single rclone rc command, not two commands

I tried that before, but also without any options (without the options/set), I get exactly the same error.

./rclone rcd -vv --log-file=log.txt --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :5572 $AUTH &
sleep 5
./rclone rc mount/mount fs=pcloud: mountPoint=/share/cloud/user/pcloud $AUTH
2022/04/20 16:44:32 DEBUG : rclone: Version "v1.58.0" starting with parameters ["./rclone" "rcd" "-vv" "--log-file=log.txt" "--rc-web-gui" "--rc-web-gui-no-open-browser" "--rc-addr" ":5572" "--rc-user=<hidden>" "--rc-pass=<hidden>"]
2022/04/20 16:44:32 ERROR : Error reading tag file at /share/system/admin/.cache/rclone/webgui/tag
2022/04/20 16:44:32 DEBUG : Current tag: , Release tag: v2.0.5
2022/04/20 16:44:32 INFO  : A release (v2.0.5) for gui is present at https://github.com/rclone/rclone-webui-react/releases/download/v2.0.5/currentbuild.zip. Use --rc-web-gui-update to update. Your current version is ()
2022/04/20 16:44:32 NOTICE: A new release for gui (v2.0.5) is present at https://github.com/rclone/rclone-webui-react/releases/download/v2.0.5/currentbuild.zip
2022/04/20 16:44:32 NOTICE: Downloading webgui binary. Please wait. [Size: 4763452, Path :  /share/system/admin/.cache/rclone/webgui/v2.0.5.zip]
2022/04/20 16:44:33 NOTICE: Unzipping webgui binary
2022/04/20 16:44:33 NOTICE: Serving Web GUI
2022/04/20 16:44:33 INFO  : Using --user <hidden> --pass XXXX as authenticated user
2022/04/20 16:44:33 NOTICE: Serving remote control on http://[::]:5572/
2022/04/20 16:44:33 DEBUG : login_token "<hidden>"
2022/04/20 16:44:33 NOTICE: Web GUI is not automatically opening browser. Navigate to http://rclone:rclone@[::]:5572/?login_token=<hidden> to use.
2022/04/20 16:44:37 DEBUG : rc: "mount/mount": with parameters map[fs:pcloud: mountPoint:/share/cloud/user/pcloud]
2022/04/20 16:44:37 DEBUG : Creating backend with remote "pcloud:"
2022/04/20 16:44:37 DEBUG : Using config file from "/share/system/admin/.config/rclone/rclone.conf"
2022/04/20 16:44:37 INFO  : pcloud root '': poll-interval is not supported by this remote
2022/04/20 16:44:37 NOTICE: pcloud root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
2022/04/20 16:44:37 DEBUG : pcloud root '': Mounting on "/share/cloud/user/pcloud"
2022/04/20 16:44:37 mount helper error: fusermount: mount failed: Invalid argument
2022/04/20 16:44:37 mount FAILED: fusermount: exit status 1
2022/04/20 16:44:37 ERROR : rc: "mount/mount": error: fusermount: exit status 1

Mounting it without web interface works (I get the same NOTICE). Not sure what the difference is:

./rclone -vv --log-file=log.txt mount pcloud: /share/cloud/user/pcloud 
2022/04/20 16:56:21 DEBUG : rclone: Version "v1.58.0" starting with parameters ["./rclone" "-vv" "--log-file=log.txt" "mount" "pcloud:" "/share/cloud/user/pcloud"]
2022/04/20 16:56:21 DEBUG : Creating backend with remote "pcloud:"
2022/04/20 16:56:21 DEBUG : Using config file from "/share/system/admin/.config/rclone/rclone.conf"
2022/04/20 16:56:21 INFO  : pcloud root '': poll-interval is not supported by this remote
2022/04/20 16:56:21 NOTICE: pcloud root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
2022/04/20 16:56:21 DEBUG : pcloud root '': Mounting on "/share/cloud/user/pcloud"
2022/04/20 16:56:21 DEBUG : : Root:
2022/04/20 16:56:21 DEBUG : : >Root: node=/, err=<nil>

ok, at this point, we have collected enough command and debug logs.
hopefully, soon, someone more experienced with rclone rc mount/mount will provide the solution.

This suggests that fuse isn't installed properly, or maybe docker isn't configured properly.

If you look at the docker install instructions you'll see a number of other options are needed on the docker command line

# perform mount inside Docker container, expose result to host
mkdir -p ~/data/mount
docker run --rm \
    --volume ~/.config/rclone:/config/rclone \
    --volume ~/data:/data:shared \
    --user $(id -u):$(id -g) \
    --volume /etc/passwd:/etc/passwd:ro --volume /etc/group:/etc/group:ro \
    --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined \
    rclone/rclone \
    mount dropbox:Photos /data/mount &

It might be that you upgraded the docker version which is a bit stricter?

Hi Nick, thanks for your response. I am aware of the Docker setup and it is properly configured.
The last debug logs are outside the container and note that the rclone mount works. So what's the difference? fusermount seems to be installed:

root@atlas ~ # fusermount -V
fusermount version: 2.8.4

I think this might be the same as this issue

Try adding this to your rclone rc mount/mount command line

mountOpt='{ "DeviceName": "rclone" }'

BTW mountOpt is a better way of passing in the "mount": {"AllowOther": true} options and vfsOpt is a better way of passing in the "vfs": {"UID": '$PUID', "GID": '$PGID', "Umask": 23, "CacheMode": 3}, so try something like this first

rclone rc mount/mount fs=pcloud: mountPoint=/data/pcloud mountOpt='{ "DeviceName": "rclone" }'

or in full with all your options

rclone rc mount/mount fs=pcloud: mountPoint=/data/pcloud mountOpt='{ "DeviceName": "rclone", "AllowOther": true }' vfsOpt='{"UID": '$PUID', "GID": '$PGID', "Umask": 23, "CacheMode": 3}'

I've attempted to fix this here - can you give it a go please?

v1.59.0-beta.6081.045c37b65.fix-6044-mount-fsname on branch fix-6044-mount-fsname (uploaded in 15-30 mins)

Adding the option mountOpt='{ "DeviceName": "rclone" } fixes the issue, thanks!
I also tried the beta version and that removes the need of explicitly adding the DeviceName.

The options with vsfOpt and mountOpt look better than what I had with the option -json. With what option can I add transfers (to limit the amount of transfers) or do I need to add that via rclone rc options/set (as I did)?