I was trying to get Plex to run in a container on CoreOS and for the life of me I couldn't get it to start. I kept getting the following error:
Error: Unable to set up server: bind: Cannot assign requested address (N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEEE)
It turns out that at some point I had enabled IPv6 and that caused the problem.
So edit your Preferences.xml
and disable IPv6 via EnableIPv6="0"
Here's my plex.service
for completeness.
[Unit]
Description=plex media server
After=docker.service
#After=docker-registry.service
[Service]
TimeoutStartSec=0
Restart=always
KillMode=none
EnvironmentFile=/media/metadata/plex/environment
ExecStop=-/usr/bin/docker stop plex
ExecStartPre=-/usr/bin/docker kill plex
ExecStartPre=-/usr/bin/docker rm plex
ExecStartPre=/usr/bin/docker pull timhaak/plex:latest
ExecStart=/usr/bin/docker run --name plex --rm \
--net=host \
--env-file /media/metadata/plex/environment \
-v /home/plex:/config \
-v /home/media:/media \
timhaak/plex:latest