Discussion - GCE plex scanning | PlexGuide.com

Discussion GCE plex scanning

  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now

Kn0s

Experienced
Original poster
Sep 30, 2018
55
12
What do you guys do about scanning new content from your GCE servers? Just manual or on a timer? I found a python script that monitors your rclone logs and updates plex on complete uploads, but couldn’t get it working.
 

ubjeckle

Citizen+
Mar 11, 2018
16
2
i'm still using pgscan / plex autoscan for it , just use the webhooks on your radarr / sonarr instances on your gce , and make sure your mounts are the same and it will only scan the recently added media
 

ubjeckle

Citizen+
Mar 11, 2018
16
2
it has been for the time i have used it, just you need to play with the time settings in the config to be like scan delay 60-120secs for your main server to pickup the changes to your tdrive / gdrive
 

Kn0s

Experienced
Original poster
Sep 30, 2018
55
12
Thanks I will give it a try. It’s a long wiki so abit to setup.
 

ubjeckle

Citizen+
Mar 11, 2018
16
2
It was a bit of a pain to setup to begin with just make sure you get the mount settings right in the config. This is where i was running into trouble at first.
 
  • Like
Reactions: 1 user

Kn0s

Experienced
Original poster
Sep 30, 2018
55
12
pgscan is kicking my a**. think i have a probem with pgblitz not running plex as the "plex" user. did you change anything with users? I get "sudo: unknown user: plex" when running python scan.py sections
 

ubjeckle

Citizen+
Mar 11, 2018
16
2
pgscan is kicking my a**. think i have a probem with pgblitz not running plex as the "plex" user. did you change anything with users? I get "sudo: unknown user: plex" when running python scan.py sections
Since I'm using gce the users permissions are default and I have , the script running from the default user Ubuntu for gce , you able to post your plex_autoscan log ?
 

Kn0s

Experienced
Original poster
Sep 30, 2018
55
12
The error i'm getting atm is
INFO - PLEX [140478917203776]: Using Plex Scanner
terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
what(): boost::filesystem::create_directories: Permission denied: "/config/Library/Logs"
****** PLEX MEDIA SCANNER CRASHED, CRASH REPORT WRITTEN: /config/Library/Application Support/Plex Media Server/Crash Reports/1.15.4.919-8e2884e4b/PLEX MEDIA SCANNER/2bea2e29-2567-aa4c-64efdc46-0e70e47b.dmp
terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
what(): boost::filesystem::create_directories: Permission denied: "/config/Library/Logs"
bash: line 1: 12498 Aborted (core dumped) /usr/lib/plexmediaserver/Plex\ Media\ Scanner --list
my setup is VPS with plex and a GCE feeder.
 

ubjeckle

Citizen+
Mar 11, 2018
16
2
I'm using a dedi from hetz + gce feeder , and works flawlessly , some of the settings in the config are fine as default but the Plex dB has to be changed to match the docker container path for the dB files eg /opt/appdata/Plex/.../.../ By default in the config I think it is set to /var/lib/Plex media server /.../...
 

Kn0s

Experienced
Original poster
Sep 30, 2018
55
12
do you use plex:34200 as URL? think there might be a problerm there.
 

Kn0s

Experienced
Original poster
Sep 30, 2018
55
12
I get this also
/opt/appdata/pgscan$ python scan.py update_sections
2019-04-22 13:20:58,101 - INFO - CONFIG [140436299642688]: Using default setting --loglevel=INFO
2019-04-22 13:20:58,101 - INFO - CONFIG [140436299642688]: Using default setting --cachefile=cache.db
2019-04-22 13:20:58,101 - INFO - CONFIG [140436299642688]: Using default setting --tokenfile=token.json
2019-04-22 13:20:58,101 - INFO - CONFIG [140436299642688]: Using default setting --queuefile=queue.db
2019-04-22 13:20:58,102 - INFO - CONFIG [140436299642688]: Using default setting --logfile=plex_autoscan.log
2019-04-22 13:20:58,102 - INFO - CONFIG [140436299642688]: Using default setting --config=config/config.json
2019-04-22 13:20:59,098 - INFO - AUTOSCAN [140436299642688]:
PG Scan Started!

2019-04-22 13:20:59,113 - INFO - PLEX [140436299642688]: Requesting section info from Plex...
2019-04-22 13:20:59,118 - ERROR - PLEX [140436299642688]: Issue encountered when attemping to dynamically update section mappings
Traceback (most recent call last):
File "/opt/appdata/pgscan/plex.py", line 24, in updateSectionMappings
conf.configs['PLEX_LOCAL_URL'], conf.configs['PLEX_TOKEN']),timeout=30)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 640, in send
adapter = self.get_adapter(url=request.url)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 731, in get_adapter
raise InvalidSchema("No connection adapters were found for '%s'" % url)
InvalidSchema: No connection adapters were found for 'plex:32400/library/sections/all?X-Plex-Token=XXXXXXXXXX'
 

ubjeckle

Citizen+
Mar 11, 2018
16
2
No I use the up of the Plex server as the Plex server how I have it setup is on my hetz server so needs up + port as it won't be able to file the the docker container as it isn't local
 

Kn0s

Experienced
Original poster
Sep 30, 2018
55
12
the i just get the error from before with permissions. if i put in the url of my plex erternal i get ssl errors
 

Kn0s

Experienced
Original poster
Sep 30, 2018
55
12
Plex_autoscan.log
adapter = self.get_adapter(url=request.url)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 731, in get_adapter
raise InvalidSchema("No connection adapters were found for '%s'" % url)
InvalidSchema: No connection adapters were found for 'plex:32400/library/sections/all?X-Plex-Token=XXXXXX'
2019-04-22 13:32:53,015 - INFO - AUTOSCAN [140417401009984]:
PG Scan Started!

2019-04-22 13:32:53,015 - INFO - AUTOSCAN [140417401009984]: Starting server: http://0.0.0.0:3467/0e9a457ab05a4786a7257$
2019-04-22 13:33:14,065 - INFO - AUTOSCAN [139950690748224]:
PG Scan Started!

2019-04-22 13:33:14,066 - INFO - PLEX [139950690748224]: Using Plex Scanner
2019-04-22 13:33:40,140 - INFO - AUTOSCAN [140060208109376]:
PG Scan Started!

2019-04-22 13:33:40,142 - INFO - PLEX [140060208109376]: Requesting section info from Plex...
2019-04-22 13:33:40,204 - ERROR - urllib3.connection [140060208109376]: Certificate did not match expected hostname: plex$
2019-04-22 13:33:40,206 - ERROR - PLEX [140060208109376]: Issue encountered when attemping to dynamically update sec$
Traceback (most recent call last):
File "/opt/appdata/pgscan/plex.py", line 24, in updateSectionMappings
conf.configs['PLEX_LOCAL_URL'], conf.configs['PLEX_TOKEN']),timeout=30)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
SSLError: HTTPSConnectionPool(host='"SNIP"', port=32400): Max retries exceeded with url: /library/sections/all?X-P$
 

Kn0s

Experienced
Original poster
Sep 30, 2018
55
12
That would be great. Remember to remove tolkens/domains and stuff. Still think i have a stupid permission error i can't figure out.
 

Porkie

Experienced+
Staff
Aug 9, 2018
142
68
What I noticed about PGscan when I tried it was that it doesnt add your user and group ID to the service file. If you look at the autoscan GitHub page you will see it says to edit that file accordingly. If you dont you will get a bunch of errors. Also check that you have a valid plex token in your config and set the docker setting to true.

Tbh I just find it easier myself to use the original plex_autoscan as it lays out how to use it.
 

Recommend NewsGroups

      Up To a 58% Discount!

Trending