Docker Plex Server won't start/work after reboot (broken Databases?)

Hi everyone,
I have setup a unraid server this week.
Currently I am mostly still at the start, because I am trying to get plex up and running normally.
Before I was using Plex on OMV and all was fine so far.

On Unraid, I can install the docker img and then use it normally.
All good until I reboot.
Once I do that, the docker container will be stuck at:

Docker log

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 40-plex-first-run: executing…
[cont-init.d] 40-plex-first-run: exited 0.
[cont-init.d] 50-plex-update: executing…
[cont-init.d] 50-plex-update: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Starting Plex Media Server.
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 40-plex-first-run: executing…
[cont-init.d] 40-plex-first-run: exited 0.
[cont-init.d] 50-plex-update: executing…
[cont-init.d] 50-plex-update: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Starting Plex Media Server.
Starting Plex Media Server.
Starting Plex Media Server.
Starting Plex Media Server.
Starting Plex Media Server.
Starting Plex Media Server.
Starting Plex Media Server.

In the Plex Server Log i found:

Plex Server Log

Nov 18, 2018 12:04:55.966 [0x15393a3ff700] INFO - Plex Media Server v1.14.0.5465-425e4ac90 - Docker Docker Container x86_64 - build: linux-ubuntu-x86_64 ubuntu - GMT 01:00
Nov 18, 2018 12:04:55.966 [0x15393a3ff700] INFO - Linux version: 4.18.17-unRAID, language: C
Nov 18, 2018 12:04:55.966 [0x15393a3ff700] INFO - Processor Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
Nov 18, 2018 12:04:55.967 [0x15393a3ff700] INFO - /usr/lib/plexmediaserver/Plex Media Server
Nov 18, 2018 12:04:55.966 [0x153945c98800] DEBUG - BPQ: [Idle] → [Starting]
Nov 18, 2018 12:04:55.967 [0x153945c98800] DEBUG - FeatureManager: Using cached data for features list
Nov 18, 2018 12:04:55.967 [0x153945c98800] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.13.0, threadsafe=1
Nov 18, 2018 12:04:55.969 [0x153945c98800] INFO - SQLITE3:0x10, 283, recovered 99 frames from WAL file /config/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db-wal
Nov 18, 2018 12:04:55.969 [0x153945c98800] ERROR - SQLITE3:0x10, 11, database corruption at line 60663 of [fc49f556e4]
Nov 18, 2018 12:04:55.969 [0x153945c98800] ERROR - SQLITE3:0x10, 11, database disk image is malformed
Nov 18, 2018 12:04:55.969 [0x153945c98800] ERROR - Database corruption: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000
Nov 18, 2018 12:04:55.969 [0x153945c98800] ERROR - Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000 (N4soci10soci_errorE)

When I do turn off the plex docker container and overwrite the
/mnt/cache/appdata/PlexMediaServer/Library/Application Support/Plex Media Server/Plug-in Support/Databases
folder, the server will start normally.
But it will break again after a restart.
I was seeking support already in the unraid forums, but according to them, the docker image and service starts up and works correctly.

Details:
Repository: plexinc/pms-docker:plexpass
Server Version#: 1.14.0.5465-425e4ac90

Do you need anything else?

I would seriously appreciate some advice.

Thanks,
Daniel

1 Like

As a sanity check, make sure that the Database you copy over doesn’t exhibit the same problems outside of Docker. It could be that the database has corruption already and your usage in Docker is just exposing it.

Hi,
thanks for answering. I switched to the docker repo of LinuxServer.io and after some try and fail, suddently it’s just working.
I had given up with the official plex container.

Did you start over with a new database? Because I’m getting the exact same issue and logfiles since 1.14 with unRAID. It happened when I let the container update to 1.14. It’s weird. I have not yet deleted the database, because that would suck (viewed/unviewed). Tried it with both linuxserver as well as plexinc docker image.

Hi,
no i didn’t start over with a new db.
But i noticed that something was breaking it. This means also the files didnt look correctly anymore.

After switching to LinuxServer.io plex repo and a completely new docker image, i created the container, after starting it and seeing the web gui i stopped the docker container and copied the last db files i was sure, which worked.
I left our the plugin once. And then it was jsut working fine at some point.

For some reason i didn’t manage to get the same running with the official repo

1 Like

Thank you! While you responded I just found out where it went wrong. For some reason the appdata share was allowing spreading over multiple disks. When I mapped the /config to the /mnt/user/appdata/PlexMediaServer, the FUSE system just went nuts and gave me the exact error messages you had.

mapping it to /mnt/disk1 or /mnt/cache fixed this. Only found this out when I had already deleted the db eventually and also the backup because I was like, whatever, never gonna go get it back working haha (thought it probably corrupted…)

Doh!

This is what solved the issue: https://forums.unraid.net/topic/59053-solved-some-containers-work-others-dont/

Interesting. Was not the case for me though. I had mapped appdata to cache only.

What doesn’t work for me, if i change the path from /mnt/user/appdata to /mnt/cache/appdata even though it’s physically the same.
In the unraid forums there was a suggestion to do so, but i didn’t succeed.

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