Authorization constantly failing each day

What is the problem you are having with rclone?

Every day, Plex constantly states "Please check drive is mounted". When looking through logs I see the following:

2021/02/18 00:06:29 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
(Repeated 500 times)
2021/02/18 00:06:29 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:29 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:29 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:29 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:29 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:29 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:29 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:29 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:30 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:30 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:30 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:30 ERROR : /: Dir.Stat error: couldn't list directory: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:36 INFO  : Google drive root 'media': Failed to get StartPageToken: googleapi: Error 401: Invalid Credentials, authError
2021/02/18 00:06:57 NOTICE: Serving remote control on http://127.0.0.1:5572/
2021/02/18 03:30:02 INFO  : Encrypted drive 'gmedia:/Movies - Swedish': Transfer session deadline: 2021/02/18 11:30:02
2021/02/18 03:30:02 INFO  : Encrypted drive 'gmedia:/TV Shows - Swedish': Transfer session deadline: 2021/02/18 11:30:02
2021/02/18 03:30:03 INFO  : There was nothing to transfer
2021/02/18 03:30:03 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Elapsed time:         2.3s

2021/02/18 03:30:03 INFO  : There was nothing to transfer
2021/02/18 03:30:03 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Elapsed time:         2.4s

2021/02/18 03:57:52 ERROR : Movies/Enemy Mine (1985)/Enemy.Mine.1985.Remux-1080p.mkv: ReadFileHandle.Read error: low level retry 1/10: EOF
2021/02/18 07:56:27 INFO  : Encrypted drive 'gmedia:/Movies': Transfer session deadline: 2021/02/18 17:56:27

Which then prevents the use of the media located in the drive. I have tried to use rclone config reconnect gdrivemedia: however this does not seem to resolve the issue. This was working fine last week before the consistent power outages in the midwest US. Usually a reboot resolves it for a day, but the issue persists every day. If needed, I can bump the log file verbosity up,

What is your rclone version (output from rclone version)

rclone v1.54.0
- os/arch: linux/amd64
- go version: go1.15.7

Which OS you are using and how many bits (eg Windows 7, 64 bit)

cat /etc/issue
Ubuntu 20.04.2 LTS \n \l

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)

$ cat /etc/systemd/system/rclone-gmedia.service 
[Unit]
Description=RClone Service
Wants=network-online.target
Before=docker.service
After=network-online.target

[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/me/.config/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount gmedia: /mnt/rclone/gmedia \
--allow-other \
--buffer-size 128M \
--dir-cache-time 1000h \
--log-level INFO \
--log-file /var/log/rclone/media.log \
--poll-interval 15s \
--timeout 1h \
--umask 002 \
--rc \
--rc-addr=127.0.0.1:5572

ExecStop=/bin/fusermount -uz /mnt/rclone/gmedia
Restart=on-failure
User=me
Group=me

[Install]
WantedBy=multi-user.target

The rclone config contents with secrets removed.

$ cat ~/.config/rclone/rclone.conf 
[ggames]
type = drive
scope = drive
token = omit
team_drive = omit

[gdrivesoftware]
type = drive
scope = drive
token = omit
team_drive = 0AGODLGuRjWlHUk9PVA

[gdrivemedia]
type = drive
scope = drive
token = omit
team_drive = 0ABw3jTWf8HKKUk9PVA
client_id = 26106763180-65vk5lhlaab4q87bn4q2fd4rd8ql4sgr.apps.googleusercontent.com
client_secret = omit

[gcache]
type = cache
remote = gdrivemedia:media
plex_url = https://192-168-2-8.3fee5a63626a48adba096fd448e79737.plex.direct:32400
plex_username = omit
plex_password = omit
chunk_size = 16M
chunk_total_size = 24G
info_age = 2
plex_token = omit

[gmedia]
type = crypt
remote = gdrivemedia:media
filename_encryption = standard
directory_name_encryption = true
password = omit
password2 = omit

[gdrivemusic-archive]
type = drive
scope = drive
team_drive = 0AF0TKD07fcxXUk9PVA
service_account_file = /mnt/pool/storage/rclone/omit

[gdrivemusic-archive-crypt]
type = crypt
remote = gdrivemusic-archive:Music - Archive
filename_encryption = standard
directory_name_encryption = true
password = omit
password2 = omit

[gdrivegames]
type = drive
client_id = 26106763180-clpq6bj9fhoi9re1k4aliv652mp97ho9.apps.googleusercontent.com
client_secret = omit
scope = drive
token = omit
team_drive = 0AMnJDL2u-UfcUk9PVA

[gdrivephotovideo]
type = drive
client_id = 26106763180-h7l1cb0em2kp3pig11q7mpl7bam693ba.apps.googleusercontent.com
client_secret = omit
scope = drive
token = omit
team_drive = 0AHdD7I3gUsT1Uk9PVA

[gdriveelearning]
type = drive
scope = drive
token = omit
team_drive = 0ANAv-RkYNsrMUk9PVA
service_account_file = /mnt/pool/storage/rclone/omit

[gdriveebooks]
type = drive
client_id = 26106763180-808jc1qsjrqje6nl215s3cgonjrckv5r.apps.googleusercontent.com
client_secret = omit
token = omit
team_drive = 0APcxMq8UoECtUk9PVA

[gdriveebooks-crypt]
type = crypt
remote = gdriveebooks:/eBooks/
password = omit
password2 = omit

[gdrivecalibre-crypt]
type = crypt
remote = gdrivecalibre:/Calibre Library
password = omit
password2 = omit

[gdrivecalibre]
type = drive
client_id = 26106763180-li3ft3cmmd4uutdj7s52i4d0dtu4oblq.apps.googleusercontent.com
client_secret = omit
scope = drive
token = omit
team_drive = 0AFmTFk6aDKpKUk9PVA

[gdrivegames2]
type = drive
client_id = 100629686617246905666
scope = drive
service_account_file = /mnt/pool/storage/rclone/omit
team_drive = 0AAmyS7T77KVmUk9PVA

[gdriveebooks2]
type = drive
client_id = 106427045904212305436
scope = drive
service_account_file = /mnt/pool/storage/rclone/omit
team_drive = 0AMlj_Pv7ig76Uk9PVA

[gdriveebooks2-crypt]
type = crypt
remote = gdriveebooks2:/eBooks/
password = omit
password2 = omit

A log from the command with the -vv flag

2021/02/18 08:49:38 DEBUG : TV Shows/Nancy Drew (2019)/: Attr: 
2021/02/18 08:49:38 DEBUG : TV Shows/Nancy Drew (2019)/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/02/18 08:49:38 DEBUG : : Statfs: 
2021/02/18 08:49:38 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:38 DEBUG : : Statfs: 
2021/02/18 08:49:38 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:38 DEBUG : : Statfs: 
2021/02/18 08:49:38 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:38 DEBUG : : Statfs: 
2021/02/18 08:49:38 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:38 DEBUG : : Statfs: 
2021/02/18 08:49:38 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:38 DEBUG : Movies/3022 (2019)/: ReadDirAll: 
2021/02/18 08:49:38 DEBUG : : Statfs: 
2021/02/18 08:49:38 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:38 DEBUG : : Statfs: 
2021/02/18 08:49:38 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:38 DEBUG : TV Shows - Swedish/: Lookup: name="Gåshud Med Filip Och Fredrik (2020)"
2021/02/18 08:49:38 DEBUG : TV Shows - Swedish/: >Lookup: node=TV Shows - Swedish/Gåshud Med Filip Och Fredrik (2020)/, err=<nil>
2021/02/18 08:49:38 DEBUG : TV Shows - Swedish/Gåshud Med Filip Och Fredrik (2020)/: Attr: 
2021/02/18 08:49:38 DEBUG : TV Shows - Swedish/Gåshud Med Filip Och Fredrik (2020)/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/02/18 08:49:38 DEBUG : /: Lookup: name="Movies - 4K"
2021/02/18 08:49:38 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/02/18 08:49:38 DEBUG : Movies/3022 (2019)/: >ReadDirAll: item=3, err=<nil>
2021/02/18 08:49:38 DEBUG : : Statfs: 
2021/02/18 08:49:38 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:38 DEBUG : /: Lookup: name="TV Shows - 4K"
2021/02/18 08:49:38 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/02/18 08:49:38 DEBUG : /: Lookup: name="Music"
2021/02/18 08:49:38 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/02/18 08:49:39 DEBUG : TV Shows/Nancy Drew (2019)/: Lookup: name="Season 2"
2021/02/18 08:49:39 DEBUG : TV Shows/Nancy Drew (2019)/: >Lookup: node=<nil>, err=no such file or directory
2021/02/18 08:49:39 DEBUG : TV Shows/: Lookup: name="Borgen (2010)"
2021/02/18 08:49:39 DEBUG : TV Shows/: >Lookup: node=<nil>, err=no such file or directory
2021/02/18 08:49:39 DEBUG : /: Lookup: name="TV Shows - Swedish"
2021/02/18 08:49:39 DEBUG : /: >Lookup: node=TV Shows - Swedish/, err=<nil>
2021/02/18 08:49:39 DEBUG : TV Shows - Swedish/: Attr: 
2021/02/18 08:49:39 DEBUG : TV Shows - Swedish/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/02/18 08:49:39 DEBUG : : Statfs: 
2021/02/18 08:49:39 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:39 DEBUG : Movies/3022 (2019)/: Lookup: name="3022.2019.WEBDL-1080p.mkv"
2021/02/18 08:49:39 DEBUG : Movies/3022 (2019)/: >Lookup: node=Movies/3022 (2019)/3022.2019.WEBDL-1080p.mkv, err=<nil>
2021/02/18 08:49:39 DEBUG : Movies/3022 (2019)/3022.2019.WEBDL-1080p.mkv: Attr: 
2021/02/18 08:49:39 DEBUG : Movies/3022 (2019)/3022.2019.WEBDL-1080p.mkv: >Attr: a=valid=1s ino=0 size=3385285794 mode=-rw-rw-r--, err=<nil>
2021/02/18 08:49:39 DEBUG : : Statfs: 
2021/02/18 08:49:39 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:39 DEBUG : : Statfs: 
2021/02/18 08:49:39 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:39 DEBUG : /: Lookup: name="TV Shows - 4K"
2021/02/18 08:49:39 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/02/18 08:49:39 DEBUG : : Statfs: 
2021/02/18 08:49:39 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:39 DEBUG : : Statfs: 
2021/02/18 08:49:39 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2021/02/18 08:49:39 DEBUG : /: Lookup: name="Music"
2021/02/18 08:49:39 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/02/18 08:49:39 DEBUG : /: Lookup: name="Movies"
2021/02/18 08:49:39 DEBUG : /: >Lookup: node=Movies/, err=<nil>

Excerpt after switching to debug and restarting the service, however the files are very much there (in encrypted form):

rclone -vv lsd 'gdrivemedia:/media/'
2021/02/18 08:52:51 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "-vv" "lsd" "gdrivemedia:/media/"]
2021/02/18 08:52:51 DEBUG : Using config file from "/home/me/.config/rclone/rclone.conf"
2021/02/18 08:52:51 DEBUG : Creating backend with remote "gdrivemedia:/media/"
2021/02/18 08:52:51 DEBUG : fs cache: renaming cache item "gdrivemedia:/media/" to be canonical "gdrivemedia:media"
          -1 2019-03-30 00:31:18        -1 22nsspm63sdhbthmkerda60n1g
          -1 2020-01-05 02:00:13        -1 434emukd0mcnmpkl7l9h8216l0
          -1 2019-03-30 00:13:38        -1 87hkgcvbcmaghht2oiaj8va3t8
          -1 2020-01-05 02:12:12        -1 8a5i2tp4lp1sde03rqlnhi26lhfd2bq81k9ths9oo2tvq8ulh2kg
          -1 2020-01-05 02:00:08        -1 db9ra55gcqbtqb35oqherlmj24
          -1 2020-01-05 08:05:00        -1 lnbnm8pj7fh0c14objt93bqlccdfca9im1vtavtplhjn4f7qfih0
          -1 2020-03-26 03:00:04        -1 rugmic02jbanq43n5i5681kavk
          -1 2020-01-05 02:00:22        -1 rvg5mkl2eenh8j3sgsk6cdf180
$ rclone -vv lsd 'gmedia:/TV Shows'
2021/02/18 08:53:53 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "-vv" "lsd" "gmedia:/TV Shows"]
2021/02/18 08:53:53 DEBUG : Using config file from "/home/andrew/.config/rclone/rclone.conf"
2021/02/18 08:53:53 DEBUG : Creating backend with remote "gmedia:/TV Shows"
2021/02/18 08:53:53 DEBUG : Creating backend with remote "gdrivemedia:media/87hkgcvbcmaghht2oiaj8va3t8"
          -1 2020-05-22 22:48:18        -1 24 (2001)
          -1 2020-05-22 22:53:10        -1 30 Rock (2006)
          -1 2020-05-22 22:55:52        -1 3rd Rock from the Sun (1996)
          -1 2020-09-11 02:42:27        -1 50 States of Fright (2020)
          -1 2020-05-22 22:56:16        -1 8 Out of 10 Cats (2005)
$ rclone -vv ls 'gmedia:/TV Shows/24 (2001)/Season 1/'
2021/02/18 08:54:53 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "-vv" "ls" "gmedia:/TV Shows/24 (2001)/Season 1/"]
2021/02/18 08:54:53 DEBUG : Using config file from "/home/me/.config/rclone/rclone.conf"
2021/02/18 08:54:53 DEBUG : Creating backend with remote "gmedia:/TV Shows/24 (2001)/Season 1/"
2021/02/18 08:54:53 DEBUG : Creating backend with remote "gdrivemedia:media/87hkgcvbcmaghht2oiaj8va3t8/onr24pfm5r771hrlqdm7d7usks/4n8l1g3pdlnps563tocir52g1c"
8357032787 24 (2001) - S01E12 - 11-00 A.M. - 12-00 P.M - Bluray-1080p Remux.mkv
8186202415 24 (2001) - S01E05 - 4-00 A.M. - 5-00 A.M - Bluray-1080p Remux.mkv
8199257741 24 (2001) - S01E04 - 3-00 A.M. - 4-00 A.M - Bluray-1080p Remux.mkv
8365901271 24 (2001) - S01E08 - 7-00 A.M. - 8-00 A.M - Bluray-1080p Remux.mkv
8270513169 24 (2001) - S01E03 - 2-00 A.M. - 3-00 A.M - Bluray-1080p Remux.mkv
8049170496 24 (2001) - S01E23 - 10-00 P.M. - 11-00 P.M - Bluray-1080p Remux.mkv
8033946325 24 (2001) - S01E02 - 1-00 A.M. - 2-00 A.M - Bluray-1080p Remux.mkv
8031831999 24 (2001) - S01E22 - 9-00 P.M. - 10-00 P.M - Bluray-1080p Remux.mkv
8338019351 24 (2001) - S01E11 - 10-00 A.M. - 11-00 A.M - Bluray-1080p Remux.mkv
8325979568 24 (2001) - S01E24 - 11-00 P.M. - 12-00 A.M - Bluray-1080p Remux.mkv
8355241207 24 (2001) - S01E01 - 12-00 A.M. - 1-00 A.M - Bluray-1080p Remux.mkv
8341436457 24 (2001) - S01E07 - 6-00 A.M. - 7-00 A.M - Bluray-1080p Remux.mkv
8354572833 24 (2001) - S01E06 - 5-00 A.M. - 6-00 A.M - Bluray-1080p Remux.mkv
8085695056 24 (2001) - S01E21 - 8-00 P.M. - 9-00 P.M - Bluray-1080p Remux.mkv
8035900788 24 (2001) - S01E20 - 7-00 P.M. - 8-00 P.M - Bluray-1080p Remux.mkv
8021640733 24 (2001) - S01E19 - 6-00 P.M. - 7-00 P.M - Bluray-1080p Remux.mkv
8335704874 24 (2001) - S01E10 - 9-00 A.M. - 10-00 A.M - Bluray-1080p Remux.mkv
8372367799 24 (2001) - S01E18 - 5-00 P.M. - 6-00 P.M - Bluray-1080p Remux.mkv
8350381145 24 (2001) - S01E17 - 4-00 P.M. - 5-00 P.M - Bluray-1080p Remux.mkv
8269276115 24 (2001) - S01E16 - 3-00 P.M. - 4-00 P.M - Bluray-1080p Remux.mkv
8367977508 24 (2001) - S01E09 - 8-00 A.M. - 9-00 A.M - Bluray-1080p Remux.mkv
8211482871 24 (2001) - S01E13 - 12-00 P.M. - 1-00 P.M - Bluray-1080p Remux.mkv
8217095207 24 (2001) - S01E14 - 1-00 P.M. - 2-00 P.M - Bluray-1080p Remux.mkv
8351264250 24 (2001) - S01E15 - 2-00 P.M. - 3-00 P.M - Bluray-1080p Remux.mkv

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