Plex Media Server (Docker in Unraid) media libraries - Something went wrong

Server Version#: Unraid 6.11.1
Player Version#:Version 1.29.1.6276
Plex Media Server Logs_2022-10-13_09-21-36.zip (3.6 MB)

Hello all, a couple weeks ago my PMS stopped allowing me to see my Media libraries, either through Plex.tv or locally via the WebUI inside the Docker container running on my Unraid. I proceeded with upgrading the base Unraid OS to the latest (6.11.1), upgraded Plex to the latest (1.29.1.6276) and that didn’t help. I have tried to sign out of my account and back in, also removing and readding my server as an authorized device. I have tried running the optimize database in the troubleshooter, as well as rebuilding my metadata (which has taken days to rescan through). I have removed my libraries and readded them as well. The only thing that seems to have started working again is in my Media library, the ‘Recommended’ section works again, but both Libraries show the error, " Something went wrong - an unexpected error occurred."

image

I have three libraries.

  • Movies
  • TV Shows
  • Audiobooks

Each library has tabs, Recommended and Library. The Recommended tab shows my content in both Movies and Audibooks, but NOT in TV Shows. All three show the above error when I click on the Library tab. I suspect I have a corrupt database, but before attempting that I wanted to post here to see if I could pool the community to help me out.

Edit - I also wanted to add that I can still navigate to my Unraid shares and navigate my content and play them natively on my PC through VLC so I know that data is still there. I also am still syncing my content via Syncthing and new content comes in normally and can be played natively via Windows File Explorer.

Thanks in advance!

Oct 13, 2022 09:19:47.561 [0x147e7cad5b38] DEBUG - [Req#a1] Setting container serialization range to [0, 49] (total=-1)
Oct 13, 2022 09:19:47.561 [0x147e7cad5b38] ERROR - [Req#a1] SQLITE3:0x80000001, 11, database corruption at line 81887 of [1b256d97b5]
Oct 13, 2022 09:19:47.561 [0x147e7cad5b38] ERROR - [Req#a1] SQLITE3:0x80000001, 11, statement aborts at 7: [select distinct metadata_items.id from metadata_items  where metadata_items.library_section_id in (3) and metadata_items.metadata_type=8  order by metadata_items.title_sort] database di
Oct 13, 2022 09:19:47.562 [0x147e7cad5b38] ERROR - Got exception from request handler: sqlite3_statement_backend::loadRS: database disk image is malformed

it is corrupt. You can try to repair the database or restore a database backup

1 Like

That was the winner. I went with the restore option link and that did the trick!

Thank you!!

1 Like

Thanks for sharing. I’m having a similar issue and I’m hoping to add onto this thread. Basically end of last week i stopped being able to see my server on my Plex clients.

Navigating to the webGUI on the server returns a blank page or says the “server stopped responding.” I have upgraded plex container, upgraded unraid OS, tried restarting multiple times.

I can confirm the drive for data is mounted properly and functioning as i can navigate to it through my Mac finder.

How do i repair anything if I can’t even get into the webUI? Anyone have a console script repair?

UPDATE - i went into Logs and the error is “Error: Unable to set up server: sqlite3_statement_backend::loadOne: database disk image is malformed (N4soci10aoci_errorE). will try to repair database but harder to do thru a unraid server.

repairs are not done in the UI. In my previous post the orange text is links to how to repair and another for how to restore. Generally a restore is much easier. unless you added or watched a bunch of things since last backup ( happens every three days) then usually is not too big of a deal. If you had watch state syncing enabled, then if you need to scan recently added things in again it should update their watch state of finished stuff automatically as well

thanks Bigwheel. I’m trying to follow the instructions in your link. There isn’t the same power to do commands when using Unraid and using a container in Docker. I have to start the server so I can access the Console… then I’m trying to work through the appropriate commands but it isn’t easy when you’re ~30 years since using DOS/Unix commands.

I’ve got myself navigated to here but I can’t get into the SQLite dir. suggestions?

dir

CrashUploader Plex\ Media\ Fingerprinter Plex\ Relay Plex\ Transcoder etc
Plex\ Commercial\ Skipper Plex\ Media\ Scanner Plex\ SQLite Plex\ Tuner\ Service lib
Plex\ DLNA\ Server Plex\ Media\ Server Plex\ Script\ Host Resources

cd Plex SQLite

sh: 8: cd: can’t cd to Plex

cd Plex\ SQLite

sh: 9: cd: can’t cd to Plex SQLite

Plex SQLite is an application, not a directory. You need to cd into the database directory. then run that application on the com.plexapp.plugins.library.db database in that directory.

Do you have any suggestions for how to do all this using the Container console? It appears super limited in terms of options/commands.

I can’t even figure out what my db directory is. I’m using the standard Plex Container install and none of the settings appear to state the dir.

inside the container it should be located here:/config/Library/Application Support/Plex Media Server/Plug-in Support/Databases/

or here

/mnt/user/cache/appdata/<name-of-plex-docker>/Library/Application Support/Plex Media Server/Plug-in Support/Databases

hanks I found the various directories and have made some progress. Copying out the blobs.db and library files, then back in and restarting didn’t work. I’ve been trying to follow a SpaceInvader video but the Plex SQLite command doesn’t appear to be working?

As you can see in the directory listing in the bash terminal:
/mnt/user/appdata/Plex-Media-Server/databasetools/plexmediaserver#

Plex\ SQLite* is shown. I’m not sure why there’s a backslash and a star. Then I tried to write this script to run it and check integrity:

“Plex SQLite” “/mnt/user/appdata/Plex-Media-Server/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db” “PRAGMA integrity_check”

but it returns that the command isn’t found
bash: Plex SQLite: command not found

what am i typing wrong?

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