Server Version#: 1.30.2.6563-3d4dc0cce (shows on the downloaded install file)
Player Version#: whatever’s loading for web, Apple TV. i.e. latest
Hi.
Some oddness has occurred. At some point the PMS software stopped working.
PMS running on M1 Mac mini. Running Tautulli.
From a fresh reboot, watching Activity Monitor, these processes start.
Plex Plug-in [com.plexapp.agents.thetvdb]
Plex Plug-in [com.plexapp.system]
Plex Plug-in [com.plexapp.agents.localmedia]
Plex Plug-in [com.plexapp.agents.imdb]
I see the Plex icon appear in the Mac toolbar, then disappear a moment later.
I’m not sure which logs will help. So I’m including the following:
~/Library/Logs/Plex Media Server/ PMS Plugin Logs/ com.plexapp.system.log: com.plexapp.system.log - Pastebin
What I’ve tried: restoring from Time Machine the
~/Library/Application Support/Plex Media Server/Plug-in Support/Databases directory, com.plexapp.plexmediaserver.plist the as well as the entire ~/Library/Application Support/Plex Media Server/.
The only thing that has worked is to delete ~/Library/Application Support/Plex Media Server/ and reconfigure my library paths. But I lose all the play count / play status info, which isn’t great, but what’s bad for me is I lose my playlists (music). Most were imported from iTunes, but I did create a couple new ones that I really want back.
Any help would be greatly appreciated! Any other logs I can include?
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.
PS: restoring the database from TimeMachine is a gamble as the TimeMachine snap can well happen while your server has been writing to the database which is due to produce a corrupted database when restoring. If you want to restore an older version of the database, use the database backups created by Plex instead. https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/
When I do this, this is the output in the terminal:
% /Applications/Plex\ Media\ Server.app/Contents/MacOS/Plex\ Media\ Server
Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2048 (N4soci10soci_errorE)
Fair enough on the Time Machine aspect. I have actually tried restoring from maybe 4 multiple back up points in Time Machine but with no luck.
I did see what I think are the official backup databases in Plug-in Support/Databases but they seemed out of date. The latest backup files for db and blobs.db were from different dates back in the Fall. I’m not sure why they haven’t gotten backed up more recently.
So I just tried the following: remove the old .db and blobs.db files, then rename the above 2 dated files (removed the date, leaving the .db extension), then tried starting PMS but it didn’t start. Same error as found in the terminal approach that I pasted above.
First… your database is corrupted to a degree that seems to block the server from even starting up.
Apparently it’s been corrupted since late October (that’s when the server stopped creating new backups of its own).
You can attempt to repair the database or to actually restore the working database backup from October (in which case you’ll lose any changes you’ve done since then (see guide from above). If you go with one of the two procedures, make sure to stick to them “to the letter” – don’t leave any steps out.
Thanks - I finally got around to trying to repair the database… seemed to work!(?)
The last step had lots of lines of errors showing up in the console like this:
Error: near line 1097646: trigger fts4_tag_titles_after_update_icu already exists
Error: near line 1097647: trigger fts4_tag_titles_after_insert_icu already exists
So I almost didn’t try it but I did and Plex fired up! Losing play counts was not great, but I really didn’t want to lose those playlists and now they are back. Thanks again!