Hi all,
I have an issue with my Plex Media Server. Every time it starts up, it says the server is unclaimed and starts a short wizard to claim it and define the libraries. However this list is pre-populated with all the libraries that were there previously. The PMS now pops up as a new device under Authorized Devices. The process repeats every time the PMS service is restarted.
Between restarts the PMS seemingly operates as usual, but all libraries are empty and no files can be added. The media scanner is seeing the files, but does not actually import them into the library. Digging through the logs (see attached zip file), it looks like the media scanner has problems authenticating with PMS:
Nov 19, 2018 10:33:29.119 [0x7faadd463800] DEBUG - Performing a scan with 'Plex Premium Music Scanner' (language: en virtual: 0).
Nov 19, 2018 10:33:29.119 [0x7faadd463800] DEBUG - * Scanning /share/CACHEDEV3_DATA/Fridge/media/Music
Nov 19, 2018 10:33:29.119 [0x7faadd463800] DEBUG - * Scanning directory /share/CACHEDEV3_DATA/Fridge/media/Music (parent: no)
Nov 19, 2018 10:33:29.120 [0x7faadd463800] DEBUG - Adding subdirectory for scanner: "/share/CACHEDEV3_DATA/Fridge/media/Music/Headcrash"
Nov 19, 2018 10:33:29.125 [0x7faadd463800] DEBUG - Skipping over directory '', as nothing has changed; removing 0 media items from map.
Nov 19, 2018 10:33:29.217 [0x7faadd463800] DEBUG - * Scanning directory /share/CACHEDEV3_DATA/Fridge/media/Music/Headcrash (parent: yes)
Nov 19, 2018 10:33:29.218 [0x7faadd463800] DEBUG - Adding subdirectory for scanner: "/share/CACHEDEV3_DATA/Fridge/media/Music/Headcrash/Direction of Correctness"
Nov 19, 2018 10:33:29.219 [0x7faadd463800] DEBUG - Skipping over directory 'Headcrash', as nothing has changed; removing 0 media items from map.
Nov 19, 2018 10:33:29.220 [0x7faad07ff700] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20Headcrash
Nov 19, 2018 10:33:29.224 [0x7faad07ff700] DEBUG - HTTP 401 response from GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20Headcrash
Nov 19, 2018 10:33:29.239 [0x7faadd463800] DEBUG - * Scanning directory /share/CACHEDEV3_DATA/Fridge/media/Music/Headcrash/Direction of Correctness (parent: yes)
Nov 19, 2018 10:33:29.240 [0x7faadd463800] DEBUG - Adding file for scanner: "/share/CACHEDEV3_DATA/Fridge/media/Music/Headcrash/Direction of Correctness/09 Something to Prove.m4a"
Nov 19, 2018 10:33:29.240 [0x7faadd463800] DEBUG - Adding file for scanner: "/share/CACHEDEV3_DATA/Fridge/media/Music/Headcrash/Direction of Correctness/04 Freedom.m4a"
Nov 19, 2018 10:33:29.240 [0x7faadd463800] DEBUG - Adding file for scanner: "/share/CACHEDEV3_DATA/Fridge/media/Music/Headcrash/Direction of Correctness/02 Scapegoat.m4a"
Nov 19, 2018 10:33:29.240 [0x7faadd463800] DEBUG - Adding file for scanner: "/share/CACHEDEV3_DATA/Fridge/media/Music/Headcrash/Direction of Correctness/12 Product.m4a"
Nov 19, 2018 10:33:29.241 [0x7faadd463800] DEBUG - Directory had 4 files, database had 0 files, can't skip.
Nov 19, 2018 10:33:35.416 [0x7faadd463800] DEBUG - * Scanning Headcrash / Direction Of Correctness
Nov 19, 2018 10:33:35.417 [0x7faadd463800] DEBUG - Looking for path match for [/share/CACHEDEV3_DATA/Fridge/media/Music/Headcrash/Direction of Correctness/02 Scapegoat.m4a]
Nov 19, 2018 10:33:35.418 [0x7faadd463800] DEBUG - Skipping hash check, no size match for 8148496 bytes.
Nov 19, 2018 10:33:35.418 [0x7faadd463800] DEBUG - No match for hash.
Nov 19, 2018 10:33:35.422 [0x7faadd463800] DEBUG - Creating artist 'Headcrash'
Nov 19, 2018 10:33:35.426 [0x7faadd463800] DEBUG - Downloading document http://127.0.0.1:32400/library/changestamp
Nov 19, 2018 10:33:35.426 [0x7faadd463800] DEBUG - HTTP requesting GET http://127.0.0.1:32400/library/changestamp
Nov 19, 2018 10:33:35.430 [0x7faadd463800] DEBUG - HTTP 401 response from GET http://127.0.0.1:32400/library/changestamp
Nov 19, 2018 10:33:35.431 [0x7faadd463800] ERROR - downloadContainer: expected MediaContainer element, found html
Nov 19, 2018 10:33:35.431 [0x7faadd463800] ERROR - Exception inside transaction (inside=1) (../Library/MetadataItem.cpp:3072): Unable to allocate a changestamp from the server
Nov 19, 2018 10:33:35.439 [0x7faadd463800] ERROR - Exception assimilating media item in Headcrash/Direction of Correctness: Unable to allocate a changestamp from the server
This is on a QNAP TS-251 with 4.3.5. Both the QNAP app store 1.3.5.5291 and the Plex-provided 1.13.9.5456 package exhibit the same problem, and I have uninstalled and reinstalled these packages multiple times. I have another QNAP (TS-453Be) which runs PMS 1.3.5.5291 from the QNAP app store without any problems whatsoever.
There are no firewalls on the QNAP itself, and while the system has created a couple of “virtual switches” (for docker and LXC) this doesn’t seem to be the culprit. The iptables setup looks normal. I have tried adding all the local networks to the list of networks allowed without authentication and there was no difference.
My main hypothesis right now is that PMS doesn’t receive or distribute the access token properly, but I don’t know how to debug that. Thankful for advice!
Cheers,
–Martin