Rclone RCD: Error 401 Invalid Credentials, authError

I am running an rclone rcd server with this command:

nohup /home/rs/DarKSkuLL/rclone/rclone rcd --rc-job-expire-duration=1ms --rc-job-expire-interval=10ms --rc-user z --rc-pass z --log-level=DEBUG --rc-web-gui &

It not able to fetch a new token.
Rclone works when i do a normal call.

user@cpusrv-xeon-66:~$ rclone about of3:
Used:    9.706G
Trashed: 1.106G
Other:   2.973G
user@cpusrv-xeon-66:~$ rclone rc  operations/about remote='' fs='of3:' -vv --rc-addr=z:z@localhost:5572
2019/08/31 21:47:22 DEBUG : rclone: Version "v1.49.1" starting with parameters ["rclone" "rc" "operations/about" "remote=" "fs=of3:" "-vv" "--rc-addr=z:z@localhost:5572"]
2019/08/31 21:47:22 Failed to rc: Failed to read rc response: 500 Internal Server Error: {
        "error": "about call failed: failed to get Drive storageQuota: googleapi: Error 401: Invalid Credentials, authError",
        "input": {
                "fs": "of3:",
                "remote": ""
        "path": "operations/about",
        "status": 500

of3 rclone.config entry:

type = drive
client_id = 751347XXXXps.googleusercontent.com
root_folder_id = 1B_YXJXXXX7bognhwcMLqc
client_secret = H8uJcLATgXXXXOU5-0zKM
scope = drive
chunk_size = 128M
upload_cutoff = 1k
token = {"access_token":"ya29.Glx1B6gDMXXXXX_mft3J8kIC8WV5_jXVwrSxIccSnA","token_type":"Bearer","refresh_token":"1/o5osugTRH_dUXXXXOyjR0Ss","expiry":"2019-08-31T23:42:04.067764876+05:30"}

Any ideas whats wrong?

googleapi: Error 401: Invalid Credentials, authError

This is obviously the issue, and that can only mean an authentication problem. We just need to find out why.

  • When you test outside the RC and it works, is that on the same system?
  • If it's on Linux - is it using the same user that rclone remote runs under? I say that because you should make sure that you are not accidentally using a different config file.
  • Are you sure the user rclone RC runs under has read and write access to the config file? (needed to update tokens as they expire)

I'm not super familiar with the RC syntax, but this looks weird to me. Are you sure it's correct to have an empty remote specified? I would assume the remote name would go there...

You should also immediately redact the sensitive information from your config.
At least client secret and token (ideally also clientID). These could potentially be misused by people with malicious intentions and should not be shared publicly.

He did that already as those are the "XXXX" in his config.

Failed to notice that detail. my mistake. That should render them fairly harmless I guess.

Is the rclone rcd running as the same user that you ran the rclone about with - that is all I can think of. Perhaps they are looking at different config files?

They are running as the same user.
Looking at same config files.

Does rclone rcd command load the config in its memory on execution?
I mean, if the config file is changed after running rcd will it be reflected on the server?
My assumption is something changed in the config file after I ran the rcd server.

Yes it does.

If you've used the backend then rcd will have it cached.

However if you haven't used the backend then I think rclone will re-read the config file (but not 100% sure!)

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