Plex (unhealthy) in docker after power outage

Server Version#:6.12.0
/config/Library/Application Support/Plex Media Server/Preferences.xml:1.1: Document is empty

^
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
/config/Library/Application Support/Plex Media Server/Preferences.xml:1.1: Document is empty

^
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
/config/Library/Application Support/Plex Media Server/Preferences.xml:1.1: Document is empty

^
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
/config/Library/Application Support/Plex Media Server/Preferences.xml:1.1: Document is empty

^
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
The ‘–scan’ operation is deprecated and will be removed in future versions of Plex Media Server.
The ‘–scan’ operation is deprecated and will be removed in future versions of Plex Media Server.
Generated new chapter thumbnails for Xena Warrior Princess S01E09 Death in Chains.
The ‘–scan’ operation is deprecated and will be removed in future versions of Plex Media Server.
The ‘–scan’ operation is deprecated and will be removed in future versions of Plex Media Server.
The ‘–scan’ operation is deprecated and will be removed in future versions of Plex Media Server.
The ‘–scan’ operation is deprecated and will be removed in future versions of Plex Media Server.
The ‘–scan’ operation is deprecated and will be removed in future versions of Plex Media Server.
The ‘–scan’ operation is deprecated and will be removed in future versions of Plex Media Server.
The ‘–scan’ operation is deprecated and will be removed in future versions of 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] 45-plex-hw-transcode-and-connected-tuner: executing…
[cont-init.d] 45-plex-hw-transcode-and-connected-tuner: 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
Starting Plex Media Server.
[services.d] done.
[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] 45-plex-hw-transcode-and-connected-tuner: executing…
[cont-init.d] 45-plex-hw-transcode-and-connected-tuner: 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
Starting Plex Media Server.
[services.d] done.
[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] 45-plex-hw-transcode-and-connected-tuner: executing…
[cont-init.d] 45-plex-hw-transcode-and-connected-tuner: 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
Starting Plex Media Server.
[services.d] done.
[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] 45-plex-hw-transcode-and-connected-tuner: executing…
[cont-init.d] 45-plex-hw-transcode-and-connected-tuner: 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
Starting Plex Media Server.
[services.d] done.

If someone can help me fix this please new to Plex and unraid servers.

I don’t know if this your problem but a power outage is probably at the top of the list for things that cause database corruption

Can you access the Plex UI at all?

You should probably post a full set of logs to see if that’s what the problem is
There is a repair utility if that is the issue

I think I saw Chuck say he’s not going to be around today so if you need assistance you might have to wait a bit

Thanks I will look at this and see if it helps. No worries on time its been down for 2 days now.

If there are problems with Preferences.xml, it’s not a DBRepair problem (yet) .

It’s this problem :slight_smile:

You’ll need to reclaim it without erasing all the ID’s .

I have the tool for that :sunglasses:

  1. In container; stop plex (plex_service.sh -d)
  2. Fix preferences.xml
  3. Restart

Given the file is empty – you might have to delete it completely,
Get a new PLEX_CLAIM token
Recreate the container – using the same directory bindings so you don’t lose the metadata.

Sorry not sure how to get in the container to stop plex. Is that from the unraid WebUI or console? Somone else made this for me and they are no longer around.

To get in and out of docker as well as control PMS in it is easy.

  1. Start the container
  2. use docker exec to get into the command line
  3. inside the container, run the plex_service.sh script (see below) with the -d (down) option.
  4. PMS will now stop
  5. Next, with the UserCredentialReset.sh script placed (usually where /config maps to in the real file system), run it.
  6. Observe it knows it’s inside the container
[chuck@lizum docker.2010]$ sudo bash
root@lizum:/home/chuck/docker# docker container list
CONTAINER ID   IMAGE                         COMMAND   CREATED          STATUS                    PORTS     NAMES
87142f2bd9db   plexinc/pms-docker:plexpass   "/init"   15 seconds ago   Up 14 seconds (healthy)             plex
root@lizum:/home/chuck/docker# docker exec -it plex bash
root@dockerplex:/# ls
bin	data  glock	      init		lib32	 libx32  opt		  proc	sbin  tmp	 var
boot	dev   healthcheck.sh  installBinary.sh	lib64	 media	 plex-common.sh   root	srv   transcode  version.txt
config	etc   home	      lib		libexec  mnt	 plex_service.sh  run	sys   usr
root@dockerplex:/# ./plex_service.sh -d
root@dockerplex:/# ps -ef | grep -i plex
root         372       1  0 14:16 ?        00:00:00 s6-supervise plex
root         870     820  0 14:17 pts/0    00:00:00 grep -i plex
root@dockerplex:/# root@dockerplex:/# cd config
root@dockerplex:~# ls
DBRepair.sh								 TunerService.symbols
DLNA.symbols								 UserCredentialReset.sh
Library									 plexmediaserver_1.29.2.6273-2b1f0cbcd_amd64.deb
PlexMediaServer-symbols-standard-1.31.3.6819-2ef591a4c-linux-x86_64.zip  plexmediaserver_1.31.3.6819-2ef591a4c_amd64.deb
SQLiteStub.symbols							 server_props.json
Scanner.symbols								 tmp
Server.symbols								 transcode
root@dockerplex:~# chmod +x UserCredentialReset.sh 
root@dockerplex:~# ./UserCredentialReset.sh 
 
          Plex Media Server user credential reset and reclaim tool (Docker)
 
This utility will reset the server's credentials.
It will next reclaim the server for you using a Plex Claim token you provide from https://plex.tv/claim
 
Please enter Plex Claim Token copied from http://plex.tv/claim :

This is what i see plex is running

image

I can open this.
image
and click console.
none of the commands work here.

That really differs from what I have.

I don’t know whose image that is.

Plexinc is this, and I have control.

Screenshot from 2023-06-28 17-30-32

I get this
image
should i type something different?

image

i can open terminal but get this when i try to run docker exec
Thanks for your help

Docker container list pops up here

image

I’m getting somewhere i stop PMS
image
but UserCredentialReset.sh does nothing

Here is a list of all the commands and i found how to turn off PMS but not sure where to go from here.

Usage: docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Common Commands:
run Create and run a new container from an image
exec Execute a command in a running container
ps List containers
build Build an image from a Dockerfile
pull Download an image from a registry
push Upload an image to a registry
images List images
login Log in to a registry
logout Log out from a registry
search Search Docker Hub for images
version Show the Docker version information
info Display system-wide information

Management Commands:
builder Manage builds
container Manage containers
context Manage contexts
image Manage images
manifest Manage Docker image manifests and manifest lists
network Manage networks
plugin Manage plugins
system Manage Docker
trust Manage trust on Docker images
volume Manage volumes

Swarm Commands:
swarm Manage Swarm

Commands:
attach Attach local standard input, output, and error streams to a running container
commit Create a new image from a container’s changes
cp Copy files/folders between a container and the local filesystem
create Create a new container
diff Inspect changes to files or directories on a container’s filesystem
events Get real time events from the server
export Export a container’s filesystem as a tar archive
history Show the history of an image
import Import the contents from a tarball to create a filesystem image
inspect Return low-level information on Docker objects
kill Kill one or more running containers
load Load an image from a tar archive or STDIN
logs Fetch the logs of a container
pause Pause all processes within one or more containers
port List port mappings or a specific mapping for the container
rename Rename a container
restart Restart one or more containers
rm Remove one or more containers
rmi Remove one or more images
save Save one or more images to a tar archive (streamed to STDOUT by default)
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop one or more running containers
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
top Display the running processes of a container
unpause Unpause all processes within one or more containers
update Update configuration of one or more containers
wait Block until one or more containers stop, then print their exit codes

Global Options:
–config string Location of client config files (default “/root/.docker”)
-c, --context string Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with
“docker context use”)
-D, --debug Enable debug mode
-H, --host list Daemon socket(s) to connect to
-l, --log-level string Set the logging level (“debug”, “info”, “warn”, “error”, “fatal”) (default “info”)
–tls Use TLS; implied by --tlsverify
–tlscacert string Trust certs signed only by this CA (default “/root/.docker/ca.pem”)
–tlscert string Path to TLS certificate file (default “/root/.docker/cert.pem”)
–tlskey string Path to TLS key file (default “/root/.docker/key.pem”)
–tlsverify Use TLS and verify the remote
-v, --version Print version information and quit

Run ‘docker COMMAND --help’ for more information on a command.

Thanks for your help.
I just did this and it is back up fine now.

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