Cannot start Docker Container. Hangs at "Starting Plex Media Server"

Hey there,

I just wanted to test Plex Media Server and therefore I wanted to use your Docker.
But unfortunately it seems, that I am unable to get the container started.
This is the log I have so far:


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


I’m using Docker for Windows in Version 17.09.0-ce-win33 (13620) on a Windows 10 Server.
I’ve Shared my D : Drive and my Docker-Compose Files looks like this:


version: ‘2’
services:
plex:
container_name: plex
image: plexinc/pms-docker
restart: unless-stopped
environment:
- TZ=Europe/Berlin
- PLEX_CLAIM=
network_mode: host
volumes:
- D :/Docker/plex/config:/config
- D :/Docker/plex/transcode:/transcode
- D :/Videos:/data
(The spaces between D and : are there so Markdown don’t create Smileys)


I’ve also tried to use internal Docker volumes instead of my D : Drive and I’ve tried to use docker run instead of a Docker Compose File. But it’s always the same.
I’m hanging at “Starting Plex Media Server”.

Can someone help me?

Many thanks in advance!

I think you’re good - my logs don’t show “Plex Media Successfully Started” or anything; the last line is that.

I’m a bit of a linux noob, but if you can get to the terminal perhaps try running “ps” and see if the Plex Media Server process is actually running, but I think you’ll find that you are.

Again, newbie, but are you sure you’re running in host mode? The Plex provided docker-compose is different, using:
–network=host \

If you’re running in bridge mode accidentally (the default), you won’t be able to hit your container from the network unless you define ports.

Sorry to bump an old thread, but I’m having the exact same problem.

Host: Windows 10 with Virtualbox
Using Docker-toolbox
cloned the git repo from here : https://github.com/plexinc/pms-docker
copied and edited the docker-compose-bridge.yml to docker-compose.yml using the following settings:

version: ‘2’
services:
plex:
container_name: plex
image: plexinc/pms-docker
restart: unless-stopped
ports:
- 32400:32400/tcp
- 3005:3005/tcp
- 8324:8324/tcp
- 32469:32469/tcp
- 1900:1900/udp
- 32410:32410/udp
- 32412:32412/udp
- 32413:32413/udp
- 32414:32414/udp
environment:
- TZ=America/New_York
- PLEX_CLAIM=
- ADVERTISE_IP=http://192.168.1.49:32400/
hostname: blockbuster
volumes:
- D:\plex\config:/plex/config
- D:\plex ranscode:/transcode
- R:\Media\Movies:/media/movies

And then I tried running docker-compose up from the same directory:

Jason@Forge MINGW64 /d/Minikube/plex/pms-docker (master)
$ docker-compose up
Creating network “pmsdocker_default” with the default driver
Pulling plex (plexinc/pms-docker:latest)…
latest: Pulling from plexinc/pms-docker
297061f60c36: Pull complete
e9ccef17b516: Pull complete
dbc33716854d: Pull complete
8fe36b178d25: Pull complete
686596545a94: Pull complete
efae0ec04d91: Pull complete
c07722dd6a3f: Pull complete
293f883d3ce5: Pull complete
Digest: sha256:1792599b8a6071f3eb604e7898ccd1fa8979975aa4eaba2d9bec92bd6139ccc4
Status: Downloaded newer image for plexinc/pms-docker:latest
Creating plex … done
Attaching to plex
plex | [s6-init] making user provided files available at /var/run/s6/etc…exited 0.
plex | [s6-init] ensuring user provided files have correct perms…exited 0.
plex | [fix-attrs.d] applying ownership & permissions fixes…
plex | [fix-attrs.d] done.
plex | [cont-init.d] executing container initialization scripts…
plex | [cont-init.d] 40-plex-first-run: executing…
plex | Creating pref shell
plex | Attempting to obtain server token from claim token
plex | % Total % Received % Xferd Average Speed Time Time Time Current
plex | Dload Upload Total Spent Left Speed
100 1 100 1 0 0 1 0 0:00:01 --:–:-- 0:00:01 1
plex | Plex Media Server first run setup complete
plex | [cont-init.d] 40-plex-first-run: exited 0.
plex | [cont-init.d] 50-plex-update: executing…
plex | [cont-init.d] 50-plex-update: exited 0.
plex | [cont-init.d] done.
plex | [services.d] starting services
plex | [services.d] done.

Now it’s just sitting there with a blinking cursor, and I’m not able to access any of the plex services that should be running on it. I also attempted to run with the docker-compose-host.yml config file as well, same result.

From the comments on this thread , i’m starting to wonder if it’s even possible to run the linux pms-docker container on a windows 10 host inside a linux VM due to the volume lock issues mentioned with the database files, but i’m pretty new to docker so i wasn’t 100% following that conversation.

Never mind. I realized my mistake was lack of understanding of how docker works, not a failure in the image. I was trying to load plex on my windows host ip instead of the vm ip. Running docker-machine ip gave me the ip of the VM i needed to check the app from, which loads just fine.

If I’m reading this correctly, you are using Docker on Windows. DON’T! Docker on Windows is missing key filesystem features (file locking) without which you will experience database corruption. Continue at your own peril.

I am, and thanks for the clarification @gbooker02, i’ll tread carefully (not a production machine). Just out of curiosity, is it acceptable to run the container in a linux VM if the database storage is housed inside the VM disk rather than on a virtual box shared folder or does that still violate the file locking requirement because it’s ultimately still just a file on the windows file system?

Would using something like https://github.com/winnfsd/winnfsd to mount nfs volumes from windows to the VM resolve this dependency? I couldn’t find anything about file locks from the limited documentation…

Never mind, I do not believe winnfsd supports the NLM protocol required for file locks. https://github.com/winnfsd/vagrant-winnfsd/issues/97#issuecomment-254077422

is it acceptable to run the container in a linux VM if the database storage is housed inside the VM disk rather than on a virtual box shared folder or does that still violate the file locking requirement because it’s ultimately still just a file on the windows file system?

Yes; this is a mount into docker from a FS running on the same OS as the container. The locking within the container is going to the same kernel that’s in charge of the FS, and so it works.

It’s when you are using the DB on a network protocol that you could get into trouble (a mount crossing from the host into docker running in a VM is usually via a network protocol). There are a few network protocols which support file locking but they are rare and usually not what’s used. I’ve personally tried NFS and SMB and had corrupt DBs with both, but the DB existing inside the VM’s filesystem with the containers has never had corruptions.