Plex media server won’t open on mac

Hi all new to the forum but have been using plex for about 8 months. Literally today I’ve been trying to reopen plex media server on my Mac mini it shows that it open even the little icon come up on the task bar but then instantly closes.
I have uninstalled and reinstalled, restarted the machine but still won’t work.

Any ideas?

Server Version#:
Player Version#:

Can you grab your server logs? I suspect you may have a corrupt database, but will need them to confirm.

Thank you for the reply
This was the file today a little while ago.

Jan 21, 2023 15:32:34.084 [0x700001949000] INFO - Plex Media Server v1.19.4.2935-79e214ead - Apple Mac x86_64 - build: darwin-x86_64 macos - GMT 00:00
Jan 21, 2023 15:32:34.084 [0x700001949000] INFO - MacOSX version: 10.16, language: en-GB
Jan 21, 2023 15:32:34.084 [0x700001949000] INFO - Processor Intel(R) Core™ i5-4278U CPU @ 2.60GHz
Jan 21, 2023 15:32:34.084 [0x700001949000] INFO - /Applications/Plex Media Server-3.app/Contents/MacOS/Plex Media Server
Jan 21, 2023 15:32:34.234 [0x700001ad2000] DEBUG - BPQ: [Idle] → [Starting]
Jan 21, 2023 15:32:34.238 [0x700001ad2000] DEBUG - FeatureManager: Using cached data for features list
Jan 21, 2023 15:32:34.246 [0x700001ad2000] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Jan 21, 2023 15:32:34.257 [0x700001ad2000] ERROR - SQLITE3:0x1059a2de8, 11, database corruption at line 66053 of [bf8c1b2b7a]
Jan 21, 2023 15:32:34.257 [0x700001ad2000] ERROR - SQLITE3:0x1059a2de8, 11, database disk image is malformed in “PRAGMA cache_size=2000”
Jan 21, 2023 15:32:34.259 [0x700001ad2000] ERROR - Database corruption: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000

And I was correct: ERROR - Database corruption:

Do you want to salvage your library, or is starting over OK?

If I start over again will I lose say for example any changes I have done to names and so forth? Will starting fresh be quicker?

  1. Starting over: You will loose everything associated with the previous library and you will have to do everything again. (This is the easiest solution)

  2. Database Repair: Should be fairly straight forward, but will require downloading and running a couple of commands via terminal.

I can help you with either depending on which route you want to go down.

Would prefer to try to repair the database if possible please.

Sure:
Lets make sure plex is not running then

download GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server databases open the terminal and execute DBRepair.sh

When you get to the menu we will run options 1 4 3 9

Start Plex and see if it works

That link shows the file DBRepair-Windows.zip (is this for windows?) using a Mac. Ive tried downloading it and it downloads a .bat file

You are looking for the 3rd file in that list DBRepair.sh

EDIT: Chuck is apparently attempting to write a Windows version, which is what you downloaded. (its been a great Unix tool, glad to see it being ported)

I executed the file, but no menu came up. Just at the bottom came up with [Process completed]

let me quote the correct usage instructions:

    1. Open your browser to https://github.com/ChuckPa/PlexDBRepair/releases/latest
    2. Download the source code (tar.gz) file
    3. Place the tar.gz file in the appropriate directory on the system you'll use it.
    4. Open a command line session (usually Terminal or SSH)
    5. Elevate privilege level to root (sudo)
    6. Extract the utility from the tar or zip file
    7. 'cd' into the extraction directory
    8. Give the utility 'execute' permission
    9. Invoke the utility

To launch from the command line on MacOS (on the administrator account)

        osascript -e 'quit app "Plex Media Server"'
        cd ~/Downloads
        tar xvf PlexDBRepai PlexDBRepair-0.6.1.tar.gz
        cd PlexDBRepai PlexDBRepair-0.6.1

        chmod +x DBRepair.sh
        ./DBRepair.sh

EDIT: Im betting I missed a step with my instructions previously

ill be honest, I rarely use Terminal so can’t say I am totally up to speed with it and using commands. When I run that it comes back as Error Unknown host. I think it maybe better and easier for me to just start again and learn from my mistake and keep a backup of it

We have one other recovery option, not 100% guaranteed but worth a shot.

In the finder app go to ~/Library/Application Support/Plex Media Server/Plug-in Support/Databases

and give me a screenshot of those files.

Rename:
com.plexapp.plugins.library.db-wal to com.plexapp.plugins.library.db-wal.old
com.plexapp.plugins.library.db-shm to com.plexapp.plugins.library.db-shm.old
com.plexapp.plugins.library.db to com.plexapp.plugins.library.db.old
com.plexapp.plugins.library.blobs.db-shm to com.plexapp.plugins.library.blobs.db-shm.old
com.plexapp.plugins.library.blobs.db-wal to com.plexapp.plugins.library.blobs.db-wal.old
com.plexapp.plugins.library.blobs.db to com.plexapp.plugins.library.blobs.db.old

Then:
copy com.plexapp.plugins.library.blobs.db-2023-01-11 and rename the copy to com.plexapp.plugins.library.blobs.db
copy com.plexapp.plugins.library.db-2023-01-11 and rename the copy to com.plexapp.plugins.library.db

Then try starting plex

What this does is moves the existing database out of the way (aka .old) then restores a backup from January 11th

1 Like

Woohoooo it worked. Missing a few name changes and some watched videos now showing not watched but apart from that its all there. Thank you so much, if I could buy you a beer I would. Thank you

No problem, we basically reverted your library back 10 days. We could have tried a newer backup, but I felt it was safer going back as far as we could (Keep it simple)

Can you go ahead and close plex, restart it, wait 5 minutes and give me a copy of your server logs? Id like to ensure that we don’t still have underlying issues.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.