What is the problem you are having with rclone?
(Across three Debian-based distros - 2x Ubuntu 20.04, 1x Proxmox 6.4.) Google Drive tokens appear to last 2-3 weeks. After which, it seems necessary to run rclone config reconnect <Mount>:
. This properly dumps a link that I can access and login to, yielding the token, as expected. However, after pasting the token, I receive the following, without fail, across each system (no changes to firewall, DNS, or the like).
Fatal error: failed to get token: Post "https://oauth2.googleapis.com/token": dial tcp: lookup oauth2.googleapis.com on [::1]:53: read udp [::1]:34775->[::1]:53: i/o timeout
(Maybe helpful background – I generated my config using rclone config
.)
What is your rclone version (output from rclone version
)
$ rclone version
rclone v1.56.1
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.4.0-88-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16.8
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
$ rclone clone config reconnect Media:
Already have a token - refresh?
y) Yes (default)
n) No
y/n>
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> n
Verification code
Go to this URL, authenticate then paste the code here.
# Auth URL (this works without fail).
Enter a string value. Press Enter for the default ("").
config_verification_code> # Token retrieved from Google Drive
2021/10/13 02:51:57 NOTICE: Make sure your Redirect URL is set to "urn:ietf:wg:oauth:2.0:oob" in your custom config.
Error: failed to get token: Post "https://oauth2.googleapis.com/token": dial tcp: lookup oauth2.googleapis.com on [::1]:53: read udp [::1]:34775->[::1]:53: i/o timeout
The rclone config contents with secrets removed.
[Media]
type = drive
client_id = ... # Generated from the steps on how to create a Client ID (this works)
client_secret = ... # Generated from the steps on how to create a Client ID (this works)
scope = drive
root_folder_id = ... # Filled in with the ID from the URL, as advised
use_trash = true
skip_gdocs = true
chunk_size = 64M
keep_revision_forever = true
pacer_min_sleep = 10ms
pacer_burst = 200
token = ...
team_drive =
A log from the command with the -vv
flag
$ rclone config reconnect Media: -vv
2021/10/13 03:09:15 DEBUG : Setting --config "/labs/media/rclone.conf" from environment variable RCLONE_CONFIG="/labs/media/rclone.conf"
2021/10/13 03:09:15 DEBUG : rclone: Version "v1.56.1" starting with parameters ["rclone" "config" "reconnect" "Media:" "-vv"]
2021/10/13 03:09:15 DEBUG : Using config file from "/labs/media/rclone.conf"
2021/10/13 03:09:15 DEBUG : Media: config in: state="", result=""
2021/10/13 03:09:15 DEBUG : Media: config out: out=&{State:*oauth,teamdrive,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2021/10/13 03:09:15 DEBUG : Media: config in: state="*oauth,teamdrive,,", result=""
2021/10/13 03:09:15 DEBUG : Media: config out: out=&{State:*oauth-confirm,teamdrive,, Option:true OAuth:<nil> Error: Result:}, err=<nil>
2021/10/13 03:09:15 DEBUG : Media: config: reading config parameter "config_refresh_token"
Already have a token - refresh?
y) Yes (default)
n) No
y/n>
2021/10/13 03:09:34 DEBUG : Media: config in: state="*oauth-confirm,teamdrive,,", result="true"
2021/10/13 03:09:34 DEBUG : Media: config out: out=&{State:*oauth-islocal,teamdrive,, Option:true OAuth:<nil> Error: Result:}, err=<nil>
2021/10/13 03:09:34 DEBUG : Media: config: reading config parameter "config_is_local"
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> n
2021/10/13 03:09:38 DEBUG : Media: config in: state="*oauth-islocal,teamdrive,,", result="false"
2021/10/13 03:09:38 DEBUG : Media: config out: out=&{State:*oauth-remote,teamdrive,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2021/10/13 03:09:38 DEBUG : Media: config in: state="*oauth-remote,teamdrive,,", result=""
2021/10/13 03:09:38 DEBUG : Media: config out: out=&{State:*oauth-do,teamdrive,, Option: OAuth:<nil> Error: Result:}, err=<nil>
2021/10/13 03:09:38 DEBUG : Media: config: reading config parameter "config_verification_code"
Verification code
Go to this URL, authenticate then paste the code here.
# Auth URL (this works without fail).
Enter a string value. Press Enter for the default ("").
config_verification_code> # Token retrieved from Google Drive
2021/10/13 03:09:54 DEBUG : Media: config in: state="*oauth-do,teamdrive,,", result="<Verification-Code>"
2021/10/13 03:09:54 NOTICE: Make sure your Redirect URL is set to "urn:ietf:wg:oauth:2.0:oob" in your custom config.