What is the problem you are having with rclone?
hello everyone, I have Rclone mounted as a systemd service, every once in a while it suddenly dismounts for no reason, I have checked the log and it appears that I have a problem with the token, please help. I have to say that I use this same service in another vps and they have no problem, but in this vps it is strange, I don't know if it is because of the project type created in google console api, it is worth mentioning that the project is in test mode and I don't know if that could be a cause
This is my Rclone service.
[Unit]
Description=RClone Rocast
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/root/.config/rclone/rclone.conf
ExecStart=/usr/bin/rclone mount --allow-other --dir-cache-time 12h --log-level INFO --log-file /home/Server.log --timeout 30m --umask 002 --vfs-cache-mode writes --vfs-read-chunk-size 8M --vfs-read-chunk-size-limit off --tpslimit 08 --tpslimit-burst 8 Rocast1: /home/Server
ExecStop=/bin/fusermount -uz /home/Server
Restart=on-failure
[Install]
WantedBy=default.target
This is my Log.
2021/05/21 20:56:35 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/21 20:57:35 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/21 20:58:35 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/21 20:59:35 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/21 20:59:40 INFO : Google drive root '': Change notify listener failure: Get "https://www.googleapis.com/drive/v3/changes?alt=json&driveId=0AGK8T2wos2BiUk9PVA&fields=nextPageToken%2CnewStartPageToken%2Cchanges%28fileId%2Cfile%28name%2Cparents%2CmimeType%29%29&includeItemsFromAllDrives=true&pageSize=1000&pageToken=1189994&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect Rocast2:": oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."
}
2021/05/21 21:00:35 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/21 21:00:40 INFO : Google drive root '': Failed to get StartPageToken: Get "https://www.googleapis.com/drive/v3/changes/startPageToken?alt=json&driveId=0AGK8T2wos2BiUk9PVA&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect Rocast2:": oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."
}
2021/05/21 21:01:35 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/21 21:01:40 INFO : Google drive root '': Failed to get StartPageToken: Get "https://www.googleapis.com/drive/v3/changes/startPageToken?alt=json&driveId=0AGK8T2wos2BiUk9PVA&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect Rocast2:": oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."
}
2021/05/21 21:02:35 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/21 21:02:40 INFO : Google drive root '': Failed to get StartPageToken: Get "https://www.googleapis.com/drive/v3/changes/startPageToken?alt=json&driveId=0AGK8T2wos2BiUk9PVA&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect Rocast2:": oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."
}
2021/05/21 21:03:35 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/21 21:03:40 INFO : Google drive root '': Failed to get StartPageToken: Get "https://www.googleapis.com/drive/v3/changes/startPageToken?alt=json&driveId=0AGK8T2wos2BiUk9PVA&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect Rocast2:": oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."
What is your rclone version (output from rclone version
)
rclone v1.55.1
- os/type: linux
- os/arch: amd64
- go/version: go1.16.3
- go/linking: static
- go/tags: none
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Linux Ubuntu 18.04
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
)
Description=RClone Rocast
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/root/.config/rclone/rclone.conf
ExecStart=/usr/bin/rclone mount --allow-other --dir-cache-time 12h --log-level INFO --log-file /home/Server.log --timeout 30m --umask 002 --vfs-cache-mode writes --vfs-read-chunk-size 8M --vfs-read-chunk-size-limit off --tpslimit 08 --tpslimit-burst 8 Rocast1: /home/Server
ExecStop=/bin/fusermount -uz /home/Server
Restart=on-failure
[Install]
WantedBy=default.target
The rclone config contents with secrets removed.
Paste config here
A log from the command with the -vv
flag
Paste log here