Server Version#: Windows 10 Pro
Player Version#: 1.27.1.5916
I lost power due to some nasty weather. Power is back on, but now I am unable to log into my Plex Server. When I attempt to do so I get a popup that says ‘Plex Media Server was unable to open it’s media database’.
The rest of the machine itself seems fine, loaded normally, etc and disk scans are showing no issues.
I have been running this server for for 8 or 9 years and have never had the misfortune of running into this problem before. I have had to move the server to a new machine a couple times, and once I had to start from ‘scratch’ (which was zero ‘fun’).
Anyone have any suggestions?
I would greatly appreciate ANY assistance you can provide!
The database might be corrupted due to the power failure.
Since you cannot login to the server, you can navigate to the Plex Data Folder using Windows File Explorer.
Look in the server log files. Specifically, Plex Media Server.log and (.1.log to .5.log). There will be ERROR entries that mention SQLITE3 and say “database corrupt,” “image malformed” or similar verbiage.
Example:
Jun 04, 2020 23:25:03.930 [0x700009582000] ERROR - SQLITE3:0x103550de8, 11, database corruption at line 66053 of [bf8c1b2b7a]
Jun 04, 2020 23:25:03.930 [0x700009582000] ERROR - SQLITE3:0x103550de8, 11, database disk image is malformed in “PRAGMA cache_size=2000”
Jun 04, 2020 23:25:03.930 [0x700009582000] ERROR - Database corruption: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000
If the repair is unsuccessful, you can try restoring from a backup. See Restore a Database Backed Up via ‘Scheduled Tasks’. You should check the backup for corruption using the steps outlined in the Repair support article.
If repair or restoration does not work, then you can delete the database. You will have to re-create your libraries. Your media is not touched. See the Repair article for additional info.
I checked the logs, and apparently there IS a HD issue, as this is in the Plex Media Server log: ERROR - Database corruption: sqlite3_statement_backend::loadOne: disk I/O error.
I ran a scan disk then a disk repair on the drive and tested it (but I will never NEVER trust it again, a new one will be delivered tomorrow), then I copied the dbs from the backup from the night before the power outage as those logs did not show any errors.
It is up, and I can access the server again! it stays that way until 2morrow!
Again, TYTYTY!