Server Version#: QNAP TVS-951X QTS Version 5.0.1.2248 (2022/12/15). PMS Version 1.30.2.6563 & 1.30.1.6562
Player Version#:
I recently received notification of the updated PMS from version 1.30.1.6562 to Version 1.30.2.6563. I downloaded it directly from Plex (not QNAP) and went to my QNAP server to install as usual. After updating, Plex Desktop would not connect (either via IP or plex.tv/desktop). I attempted to stop Plex via QNAP app control, and re-start it, no luck. I tried to re-install 1.30.2 again, no luck. I tried restarting the QNAP server, no luck. I also re-installed the previous version (1.30.1) that was running fine before, but it did not seem to work. When attempting to connect via the IP.address:32400/web, it gave a 503 message saying something about startup maintenance.
I have also tried using the UserCredentialReset tool. Successfully went through the whole process, but still unable to connect to the PMS – additionally, connecting via IP.address:32400/web stopped giving the 503 message instead just saying that the site cannot be reached.
My experience with Linux is minimal. While I do have the PlexData setup, and it appears to have all the settings, logs and reports there, I attempted to zip it up via Qnap FileStation & command line – it indicated that I did not have proper permissions to zip/download (even when the files/directories/share has all permissions). As an alternative, I used CAT/HEAD to view the logs and copy/pasted to a text file. Here are the Plex Media Server logs that I was able to generate (Plex Media Server.3.log was too long so I just copied the first 200 lines – remaining appeared to show Plex running routine maintenance)
Any advice would be greatly appreciated! Plex Logs.zip (15.0 KB)
The 503 message: “Plex Media Server is currently running database migrations.”
Plex is unavailable while the migration is occurring. Stopping / restarting Plex simply restarts the migration, as does jumping back and forth between versions. Wait for it to finish.
The log files have several database error messages.
Please try the following:
Stop Plex Media Server.
Leave it at whatever version is installed.
Download and run the PlexDBRepair utility.
Use options 1,4,3,9. The readme has the details.
If you see the 503 message, wait.
It may take minutes or hours for the migration to complete.
The web page will not auto-refresh. Close the browser window & re-login to update.
Hello together
I have a similar problem. Since the update, the playback of films and series is completely overloaded after 10 - 30 minutes. The video has to load for 10 seconds every 10 seconds. As if I have a bad connection, which is not the case as it is a home network stream via Ethernet cable. Note that only I start the playback and no one else is at home or my home network is overloaded in any way.
The dashboard on PlexWeb shows the bandwidth load as 350 Mbps on average. My Synology also shows an increased load. When I stope playback, the bandwidth load remains. So no relief of bandwidth. On the Synology, the load is relieved, which is very strange. Also stopping playback via the dashboard, does not relieve the bandwidth. On the Synology, the load is also no longer displayed, which is even weirder! The only thing that helps here is restarting the Plex server on my Synology. I have also restarted my Nvidia Shield, but it didn’t help.
My hardware:
DS918+ >> Nvidia Shield Pro TV >> Soundbar >> TV
Does anyone have any ideas or can I download an older version of Plex than mine?
Thank you for your response. I have gone through the steps you’ve provided as described. After using the PlexDBRepair utility, it indicated there were no issues with the database. Here are the results:
Checking the PMS databases
Check complete. PMS main database is OK.
Check complete. PMS blobs database is OK.
Exporting current databases using timestamp: 2023-01-26_02.18.17
Export: (main)…(blobs)…done.
Successfully exported the main and blobs databases. Proceeding to import into n ew databases.
Import: (main)…(blobs)…done.
Successfully imported data from exported SQL files.
Verifying databases integrity after importing.
Verification complete. PMS main database is OK.
Verification complete. PMS blobs database is OK.
Saving current databases with ‘-ORIG-2023-01-26_02.18.17’
Making imported databases active
Import complete. Please check your library settings and contents for completenes s.
Recommend: Scan Files and Refresh all metadata for each library section.
Backing up of databases
Backup current databases with ‘-ORIG-2023-01-26_10.27.26’ timestamp.
Reindexing main database
Reindexing main database successful.
Reindexing blobs database
Reindexing blobs database successful.
Reindex complete.
After running the utility, I started PMS again, and went to 192.168.1.3:32400/web in Chrome-- it still indicates that “This site can’t be reached.” The app.plex.tv/desktop also cannot reach the server. As the PMS is now started, I can hear the server chugging along as if its running its startup routine.
Thanks for your reply. I had attempted that UserCredentialReset tool before, but tried it again for good measure – it indicated that this was completed. However, no luck in getting the server running. I turned off PMS, then restarted the QNAP server to make sure everything was shut down – then went through the steps outlined. When going to the server:32400/web, it still indicates that the site cannot be reached. I’ve let it run for a couple of hours now to give it some time to run through startup routine, but no change–still unable to connect.
I have included the PMS and crash uploader logs in the attached archive. PlexLogs-230126.zip (149.7 KB)
Please let me know if you require any additional information. Thank you!
Jan 26, 2023 15:39:12.795 [0x7fe81fb800d0] DEBUG - Captured session 19.
Jan 26, 2023 15:39:12.795 [0x7fe81fb800d0] ERROR - SQLITE3:0x80000001, 1, table sqlite_master may not be modified in "UPDATE sqlite_schema SET sql = replace(sql, 'dt_integer(8)', 'datetime') WHERE name = 'media_provider_resources' AND type = 'table'"
Jan 26, 2023 15:39:12.795 [0x7fe81fb800d0] ERROR - Exception inside transaction (inside=1) (/data/jenkins/server/3523023063/Library/DatabaseMigrations.cpp:289): sqlite3_statement_backend::prepare: table sqlite_master may not be modified for SQL: UPDATE sqlite_schema SET sql = replace(sql, 'dt_integer(8)', 'datetime') WHERE name = 'media_provider_resources' AND type = 'table'
Jan 26, 2023 15:39:12.798 [0x7fe81fb800d0] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::prepare: table sqlite_master may not be modified for SQL: UPDATE sqlite_schema SET sql = replace(sql, 'dt_integer(8)', 'datetime') WHERE name = 'media_provider_resources' AND type = 'table'
Jan 26, 2023 15:39:13.747 [0x7fe81fb800d0] DEBUG - ChangestampAllocator: initialized to 5066365571793131320
Jan 26, 2023 15:39:13.815 [0x7fe81fb800d0] DEBUG - Opening 2 database sessions to library (com.plexapp.plugins.library.blobs), SQLite 3.35.5, threadsafe=1
Jan 26, 2023 15:39:13.856 [0x7fe81ad6db38] DEBUG - [JobRunner] Job running: /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/CrashUploader "--directory=/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Crash Reports/1.30.1.6562-915986d62" --version=1.30.1.6562-915986d62 --platform=Linux "--platformVersion=QTS 5.0.1.2248" --serverUuid=6f79ade69d36c6f2e03cfc9197bb1a818d394bc4 --userId=###### --sentryUrl=https://o17675.ingest.sentry.io/api/1233455/minidump/ --sentryKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --vendor=QNAP --model=x86_64 --device=TVS-951X --allowRetries=0
Jan 26, 2023 15:39:13.878 [0x7fe81ad6db38] DEBUG - [JobRunner] Jobs: Starting child process with pid 27046
is telling me there’s corruption.
Your turning DEBUG logging OFF has hurt you here. I can’t see what it’s doing or where it fails.
Log files have a fixed max size. There are 5 rollover files of 10.2 MB each plus the current log (which has a 10.2 max before it rolls over)
Given the server doesn’t respond AND it looks like the DB is corrupted, we need to turn DEBUG logging back on before deciding the DB status.
With PMS stopped
Manually edit (using nano or vi on the qnap. or QNAP text editor via FileStation and the PlexData shared folder) Preferences.xml
Specifically add, Look for LogDebug="0" and change “0” to "1:
-or-
Add LogDebug="1" on the last line of Preferences.xml before the closing />
Either of these will turn on debug logging.
I have followed your instructions and turned debugging on, and grabbed the logs – here are the logs for the PMS and Crash Uploader. PlexLogs-230126-2.zip (38.5 KB)
Thanks. Sorry for the delay. I was helping with other debugging.
Your database is damaged.
Jan 26, 2023 20:39:36.379 [0x7f72c19ac0d0] DEBUG - Captured session 19.
Jan 26, 2023 20:39:36.379 [0x7f72c19ac0d0] ERROR - SQLITE3:0x80000001, 1, table sqlite_master may not be modified in "UPDATE sqlite_schema SET sql = replace(sql, 'dt_integer(8)', 'datetime') WHERE name = 'media_provider_resources' AND type = 'table'"
Jan 26, 2023 20:39:36.380 [0x7f72c19ac0d0] ERROR - Exception inside transaction (inside=1) (/data/jenkins/server/3523023063/Library/DatabaseMigrations.cpp:289): sqlite3_statement_backend::prepare: table sqlite_master may not be modified for SQL: UPDATE sqlite_schema SET sql = replace(sql, 'dt_integer(8)', 'datetime') WHERE name = 'media_provider_resources' AND type = 'table'
Jan 26, 2023 20:39:36.383 [0x7f72c19ac0d0] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::prepare: table sqlite_master may not be modified for SQL: UPDATE sqlite_schema SET sql = replace(sql, 'dt_integer(8)', 'datetime') WHERE name = 'media_provider_resources' AND type = 'table'
Jan 26, 2023 20:39:37.259 [0x7f72c19ac0d0] DEBUG - ChangestampAllocator: initialized to 5066365571793131320
Jan 26, 2023 20:39:37.317 [0x7f72c19ac0d0] DEBUG - Opening 2 database sessions to library (com.plexapp.plugins.library.blobs), SQLite 3.35.5, threadsafe=1
Jan 26, 2023 20:39:37.575 [0x7f72bcb82b38] DEBUG - [JobRunner] Job running: /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/CrashUploader "--directory=/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Crash Reports/1.30.1.6562-915986d62" --version=1.30.1.6562-915986d62 --platform=Linux "--platformVersion=QTS 5.0.1.2248" --serverUuid=6f79ade69d36c6f2e03cfc9197bb1a818d394bc4 --userId=##### --sentryUrl=https://o17675.ingest.sentry.io/api/1233455/minidump/ --sentryKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --vendor=QNAP --model=x86_64 --device=TVS-951X --allowRetries=0
Jan 26, 2023 20:39:37.600 [0x7f72bcb82b38] DEBUG - [JobRunner] Jobs: Starting child process with pid 11252
Jan 26, 2023 20:39:37.687 [0x7f72c19ac0d0] INFO - Running migrations. (EPG 0)
Jan 26, 2023 20:39:37.700 [0x7f72c19ac0d0] DEBUG - Captured session 0.
This type of error happens when PMS is stopped before a post-upgrade database schema update completes (some of the recent ones have taken some time).
Do you want to rollback to an earlier database manually or would you like to use the tool to have it find usable backup for you ?
No problem, I appreciate you taking the time to assist!
I already have your utility setup per advice from FordGuy61 earlier in this thread so I’d have no problem trying this method. I had already attempted the database repair earlier (and it completed successfully) to no avail. In this case, would I just be using option 5 – “Replace current database with newest usable backup copy”?
Also, is there a general rule of thumb for how long to wait after an upgrade to allow for the post-upgrade database schema update to complete? Many previous upgrades were completed within a minute or two of upgrade, which is why I thought something may have gone wrong.
Thank you Chuck. Replacing the database with a backup worked. Its now loading like normal again.
For future reference, besides waiting for the upgrade to finish its startup maintenance routine, are there some best practices for upgrading PMS versions? Should the QNAP server be restarted, or PMS stopped before starting the upgrade?
Thanks Chuck. I upgraded PMS back to 1.30.2.6563, and that went fine. I then ran the tool again per your instructions, and that went smoothly. I do not see any other noticeable difference in performance.
In addition to the routine database cleanup done by PMS, should I run these tools on occasion just to clean things up?