What's new
PGBlitz.com

Register Now! Find useful tips, Interact /w Community Members and join the part the Best Community on the Internet!

Discussion Workaround for 24 hour ban on playback (403 errors) when using pgblitz

hooper

Blitz Samurai
Staff
Donor
PG Version
8.6.4
Mount Type
Blitz Encrypted
Server Type
Remote - Dedicated Server
Ok, so I was getting 403 errors on google API drive.files.get which was preventing shows from playing on the Plex. The error rate was at 100%, so it wasn't just throttling playback, this was the 24 hour ban.

I temporarily fixed this by modifying the tdrive and tcrypt services (I use crypt) to use the GDSA01 and GDSA01C rclone remotes:

sudo vi /etc/systemd/system/tdrive.service Replace tdrive: with GDSA01: on line 17
sudo vi /etc/systemd/system/tcrypt.service Replace tcrypt: with GDSA01C: on line 17

I then enabled this change by running the following commands:

sudo systemctl daemon-reload
sudo systemctl restart tdrive.service
sudo systemctl restart tcrypt.serivce

Plex is now happy again and no more 403s. I did not even have to restart mergerfs as it just seems to be happy with this change.

So, my question is would there be some way to detect 403s occurring and then automatically slide in another GDSA account when it occurs? Can we turn this into a permanent fix by automatically cycling in the next GDSA account when the 403 errors hit a high percentage?

Here is a shot of the API dashboard for the last hour that shows a switch to a different user and the drop in 403 errors as a result

1558810174404.png

Here are my tdrive.service and tcrypt.service files after this change so you can see what I did.

Code:
#!/bin/bash
#
# Title:      PGBlitz (Reference Title File)
# Author(s):  Admin9705
# URL:        https://pgblitz.com - http://github.pgblitz.com
# GNU:        General Public License v3.0
################################################################################

[Unit]
Description=tdrive Daemon
After=multi-user.target

[Service]
Type=simple
User=0
Group=0
ExecStart=/usr/bin/rclone mount GDSA01: /mnt/tdrive \
--config /opt/appdata/plexguide/rclone.conf \
--allow-non-empty \
--allow-other \
--size-only \
--uid=1000 --gid=1000 \
--umask 002 \
--log-file=/var/plexguide/logs/rclone-tdrive.log \
--log-level INFO \
--timeout 1h \
--dir-cache-time 1440m \
--vfs-cache-max-age 24h \
--vfs-read-chunk-size 128M \
--vfs-read-chunk-size-limit 5G \
--drive-chunk-size 64M \
--user-agent=sunsword \
--buffer-size 128M

ExecStop=/bin/fusermount -uz /mnt/tdrive
TimeoutStopSec=20
KillMode=process
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
Code:
#!/bin/bash
#
# Title:      PGBlitz (Reference Title File)
# Author(s):  Admin9705
# URL:        https://pgblitz.com - http://github.pgblitz.com
# GNU:        General Public License v3.0
################################################################################

[Unit]
Description=tcrypt Daemon
After=multi-user.target

[Service]
Type=simple
User=0
Group=0
ExecStart=/usr/bin/rclone mount GDSA01C: /mnt/tcrypt \
--config /opt/appdata/plexguide/rclone.conf \
--allow-non-empty \
--allow-other \
--size-only \
--uid=1000 --gid=1000 \
--umask 002 \
--log-file=/var/plexguide/logs/rclone-tcrypt.log \
--log-level INFO \
--timeout 1h \
--vfs-cache-mode writes \
--dir-cache-time 1440m \
--vfs-cache-max-age 24h \
--vfs-read-chunk-size 128M \
--vfs-read-chunk-size-limit 5G \
--drive-chunk-size 64M \
--user-agent=sunsword \
--buffer-size 128M

ExecStop=/bin/fusermount -uz /mnt/tcrypt
TimeoutStopSec=20
KillMode=process
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
 
Last edited:

kamos69

Blitz Sergeant
Donor
Thanks for this! I've been refreshing my libraries recently and have hit the 403 temp ban a few times this week. If only I'd thought of this, makes so much sense.
 

MrDoob

Administrator
Project Manager
Donor
Be sure you use the right key !!

Simple test
1.)
Bash:
cat /opt/appdata/plexguide/rclone.conf | grep "gdsa01"
2.)
Bash:
cat /opt/appdata/plexguide/rclone.conf | grep "GDSA01"
3.)
Bash:
cat /opt/appdata/plexguide/rclone.conf | grep "blitz01"
4.)
Bash:
cat /opt/appdata/plexguide/rclone.conf | grep "BLITZ01"
 

hooper

Blitz Samurai
Staff
Donor
Be sure you use the right key !!

Simple test
1.)
Bash:
cat /opt/appdata/plexguide/rclone.conf | grep "gdsa01"
2.)
Bash:
cat /opt/appdata/plexguide/rclone.conf | grep "GDSA01"
3.)
Bash:
cat /opt/appdata/plexguide/rclone.conf | grep "blitz01"
4.)
Bash:
cat /opt/appdata/plexguide/rclone.conf | grep "BLITZ01"

sudo rclone --config /opt/appdata/plexguide/rclone.conf listremotes --long
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.


Development Donations

 

Trending

Top