Server Version#: PlexMediaServer-1.32.7.7621-871adbd44-x86_64
Player Version#:
I installed this version yesterday and now my server won’t start. It goes into the system tray for a few seconds then disappears. When I look in %LOCALAPPDATA%\Plex Media Server and its subdirectories, everything I see is from the year 2020, nothing else. Sometimes when it launches I also get a Windows Popup that has a title bar ‘ERROR’ and the body of the panel says only ‘ERROR’. But I don’t always get that. I was on a 32 bit version yesterday and updated that first and was getting this behavior, so I went ahead and updated to the 64 bit version, still same behavior.
Take a look into your Windows Registry.
Check if the plex data folder has been relocated previously. Verify that this location still exists and is accessible.
If it’s not, simply delete the DWORD LocalAppDataPath to revert to the default location on drive C:
Thank you. That helped me locate my appdata folder. It exists, is accessible and there’s data. Yay! So, here’s what I think looks relevant in the “Plex Media Server” file. Any suggestions?
Nov 27, 2023 09:14:53.797 [1652] ERROR - SQLITE3:0x7ff6f8d88780, 11, database corruption at line 91363 of [a29f994989]
Nov 27, 2023 09:14:53.797 [1652] ERROR - SQLITE3:0x7ff6f8d88780, 11, statement aborts at 8: [update taggings set created_at = iif(typeof(created_at) in (‘integer’, ‘real’), created_at, strftime(‘%s’, created_at, ‘utc’))] database disk image is malformed
Nov 27, 2023 09:14:53.797 [1652] ERROR - Exception inside transaction (inside=1) (E:\jenkins\server\4165669295\Library\DatabaseMigrations.cpp:291): sqlite3_statement_backend::loadOne: database disk image is malformed
Nov 27, 2023 09:14:53.801 [1652] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed
Nov 27, 2023 09:14:54.081 [1652] DEBUG - ChangestampAllocator: initialized to 1285510
Nov 27, 2023 09:14:54.081 [1652] DEBUG - Opening 2 database sessions to library (com.plexapp.plugins.library.blobs), SQLite 3.39.4, threadsafe=1
Nov 27, 2023 09:14:54.090 [1652] INFO - SQLITE3:0x7ff6f8d88780, 283, recovered 23 frames from WAL file D:\Plex Media Server\Local App Data\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.blobs.db-wal
Nov 27, 2023 09:14:54.100 [1652] INFO - Running migrations. (EPG 0)
Nov 27, 2023 09:14:54.100 [1652] DEBUG - Captured session 0.
Nov 27, 2023 09:14:54.100 [1652] DEBUG - Captured session 1.
Nov 27, 2023 09:14:54.104 [11140] INFO - CodecManager: obtaining EAE
Nov 27, 2023 09:14:54.104 [11140] DEBUG - [HCl#1] HTTP requesting GET https://plex.tv/api/codecs/easyaudioencoder?build=windows-x86_64-standard&deviceId=daeb0041-16fd-4079-843d-11955702fd02&oldestPreviousVersion=legacy&version=1978
Nov 27, 2023 09:14:54.256 [14604] DEBUG - Grabber: Cleaning up orphaned grabs.
Nov 27, 2023 09:14:54.256 [1652] DEBUG - Media Provider: Registering provider com.plexapp.plugins.library
Nov 27, 2023 09:14:54.256 [1652] DEBUG - Auth: Refreshing tokens inside the token-based authentication filter.
Nov 27, 2023 09:14:54.257 [4716] DEBUG - [MediaProviderManager/HCl#2] HTTP requesting GET https://plex.tv/media/providers?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Nov 27, 2023 09:14:54.257 [1652] DEBUG - MyPlex: using cached data for request for https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx
Nov 27, 2023 09:14:54.259 [1652] DEBUG - MyPlex: updating with 12 access tokens
Nov 27, 2023 09:14:54.261 [14604] DEBUG - Grabber: Cleaned up 0 decrepit directories in 0.0 sec.
Nov 27, 2023 09:14:54.261 [1652] DEBUG - MyPlex: using cached data for request for https://plex.tv/api/v2/server/users?auth_token=xxxxxxxxxxxxxxxxxxxx
Nov 27, 2023 09:14:54.264 [1652] DEBUG - MyPlex: using cached data for request for https://plex.tv/api/v2/server/users/subscriptions?auth_token=xxxxxxxxxxxxxxxxxxxx
Nov 27, 2023 09:14:54.265 [1652] DEBUG - MyPlex: no cached data to load for request for https://plex.tv/api/v2/server/users/services?auth_token=xxxxxxxxxxxxxxxxxxxx
Nov 27, 2023 09:14:54.265 [14604] DEBUG - Auth: Refreshing tokens inside the token-based authentication filter.
Nov 27, 2023 09:14:54.265 [1652] ERROR - SQLITE3:0x7ff6f8d88780, 1, no such table: metadata_agent_providers in “update metadata_agent_providers set online = 0”
OK, I was able to get into SQLite, but before I went to the Low-Level Database Recovery step, I thought I’d see if there’s anything else I should try for this error:
SQLite version 3.39.4 2022-09-29 15:55:41
Enter “.help” for usage hints.
sqlite> PRAGMA integrity_check;
*** in database main ***
On tree page 19376 cell 0: Rowid 728 out of order
database disk image is malformed
sqlite> VACUUM;
sqlite> PRAGMA integrity_check;
*** in database main ***
On tree page 19376 cell 0: Rowid 728 out of order
database disk image is malformed
sqlite> REINDEX;
Runtime error: database disk image is malformed (11)
Thank you. That set of steps seems to have resolved it. The server is up and running again. I’ll have to see what, if any, data was lost. Just for completeness in case others (or I) need this in the future, are the remaining steps I completed.
I then renamed com.plexapp.plugins.library to com.plexapp.plugins.library-2023-11-27-10-45 and moved it to my Desktop folder. Then I did the remaining steps.
D:\Plex Media Server\Local App Data\Plex Media Server\Plug-in Support\Databases" C:\Program Files\Plex\Plex Media Server\Plex SQLite.exe" com.plexapp.plugins.library.db
SQLite version 3.39.4 2022-09-29 15:55:41
Enter “.help” for usage hints.
sqlite> .read db-recover.sqlite
sqlite> PRAGMA integrity_check;
ok
sqlite>
When I started PMS this time, it updated the libraries and stayed running. Hallelujah!
Thank you. I completely skipped that URL you gave the first time around and did it, as you know, manually. I would have done so anyway as I’m not likely to trust a script off the 'Net so easily. Now that I’ve done it manually, I sent ahead and downloaded the batch file, inspected it, and ran it. Server back up and running again, things looks pretty good. Thank you, again.