Been running Plex (PMS w/ PlexPass) on our Mac Mini and it’s been incredibly stable for months. We had power outage tonight during the wind storm and when I restarted the Mac after it’s unexpected shut down, everything was working except Plex. I tried downloading and reinstalling the latest version but it won’t open. I can see the Plex icon show up briefly in the toolbar for about 1 second after I try to open/start up PMS, then it disappears and nothing happens (so I guess it’s crashing in the background?). I’ve restarted the Mac twice now after reinstalling Plex and still nothing. I’d really rather not lose all my watch status and metadata but even then, no idea how to troubleshoot/repair. What can I do? I’ve never had an issue like this and don’t know where to begin. Thanks in advance.
What can I do to fix this? Usually, a reinstall fixes things but not this time.
Server Version#: v.1.32.8.7639-fb6452ebf (This is what I downloaded and reinstalled from the Plex site - I cannot get the actual server number since it’s won’t start).
Player Version#: Latest AppleTV Plex App
MacOS #: 14.2.1 (Sonoma)
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>
If the Plex Media Server won’t start and doesn’t even get to the stage where it’ll be writing to the server logs, you can attempt the following procedure to see if there’s any error messages on the OS level:
Open Finder and navigate to /Applications
Select Show Content from the context menu of the Plex Media Server.app item
Navigate to Contents/MacOS
Open the Terminal app
Drag the Plex Media Server executable from the Finder window (#3) into the Terminal Window and press Return to execute it
This is no different from running the app, so it won’t succeed – but you should get a more specific error message about what’s causing it to fail starting (e.g. if there server’s database has been corrupted during the crash/outage).
@tom80H, thanks so much for this information. I’ve never used the Terminal app like that before and it’s super straightforward (and easier than worrying about a typo when typing in a long folder location string!). Also very cool to know how to get more info when an app won’t load.
OK, the output is below. I wanted to share it before proceeding with any of the other suggestions with the hopes someone will be able to better direct me as to what’s going wrong - and therefore which of the repair solutions will work best. I’m not able to fully decipher the error myself. (I did edit my username and computer name to something generic but everything else is copied over.)
Plex Startup Error:
Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=1 (N4soci10soci_errorE)
username@mycomputer ~ %
I do have frequent auto Time Machine backups setup so the data should be there - but I’ve never needed to use them. Is it possible for me to have it only restore the Plex app/data rather than the entire system? I’m fortunate that in the few years I’ve had a Mac, I’ve never had to restore anything.
Don’t use those when restoring a database backup. They can also be corrupted (either because that snapshot of the file system was already pointing to a corrupted version or because Time Machine caught a backup in the middle of a database transaction).
I’m trying to restore the database from the link you shared above but I’m struggling. I’ve tried it a few ways and get errors each time. I’ve used the Terminal, switched successfully to the Plex Plugins then Database directory without issues. But I can’t get Plex SQLite to run. I’ve tried using the exact command in the link:
"Plex SQLite" com.plexapp.plugins.library.db
That gave the error: zsh: command not found: Plex SQLite
Then I tried giving the specific location of the Plex SQLite app:
“/Applications/Plex\ Media\ Server.app/Contents/MacOS/Plex\ SQLite” com.plexapp.plugins.library.db
Same error: zsh: no such file or directory: /Applications/Plex\ Media\ Server.app/Contents/MacOS/Plex\ SQLite
I also tried opening the Plex SQLite app from the Plex MacOs Contents directory you directed me to above but once there, I couldn’t seem to CD into the directory as directed by the link. I then tried to just use the command to have Plex SQLite open the database (since it was already running) but had no success - I just ended up with three dots and an arrow that never moved.
So, I opted for Otto’s suggestion as recommended and followed the instructions to use the latest backup that would be prior to the power-outage-shutdown-event. Oddly, when I was looking for all the db files that the instructions said to move out, I was missing the two shm & wal files for the “blobs” db (those two were present for the main db). Anyway, once duplicated and renamed, the Plex server opened right up without incident (and the two sets of shm/wal were created, as expected). So, worst case scenario at this point, I’ve missed 24 hours of watch state data - absolutely not a big del.
Huge thanks to you all for getting my Plex back up and running! I truly appreciate it. I was dreading having to rebuild from scratch! All the custom metadata, posters, etc would be gone not to mention watch states. Amazing!