Server Version#: plexinc/pms-docker:1.22.0.4163-d8c4875dd
Player Version#: NA
I’m running PMS via docker using bridge networking. I realize this is something like “hard mode”, but I have other problems with host networking I’m trying to avoid.
My container shows that PMS is binding 127.0.0.1:32400 within the container. This leads to not being able to forward any traffic to the container from outside the container making the server effectively useless.
My command to start the container:
podman run \
--name plex \
--no-healthcheck \
--publish=32400:32400/tcp \
--publish=1900:1900/udp \
--publish=3005:3005/tcp \
--publish=8324:8324/tcp \
--publish=32410:32410/udp \
--publish=32412:32412/udp \
--publish=32413:32413/udp \
--publish=32414:32414/udp \
--publish=32469:32469/tcp \
-e TZ=America/Denver \
-e PLEX_CLAIM=... \
-e ADVERTISE_IP=192.168.1.1:32400,externalip:32400 \
-e ALLOWED_NETWORKS=192.168.1.0/24 \
-h myhostname \
-v /var/opt/plex/config:/config \
-v /var/tmp/plex/transcode:/transcode \
-v /var/opt/plex/data:/data \
plexinc/pms-docker:1.22.0.4163-d8c4875dd
After the container is running I run:
podman exec -it plex /bin/sh
Then from within the container:
`apt update;apt install net-tools;netstat -tulpn’
And see:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:32600 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:39235 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:42569 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:32400 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:32401 0.0.0.0:* LISTEN -
udp 0 0 127.0.0.1:51925 0.0.0.0:* -
udp 0 0 127.0.0.1:54428 0.0.0.0:* -
udp 0 0 10.0.2.100:41545 0.0.0.0:* -
udp 0 0 10.0.2.100:41671 0.0.0.0:* -
udp 0 0 0.0.0.0:47276 0.0.0.0:* -
udp 0 0 0.0.0.0:32410 0.0.0.0:* -
udp 0 0 0.0.0.0:32412 0.0.0.0:* -
udp 0 0 0.0.0.0:32413 0.0.0.0:* -
udp 0 0 0.0.0.0:32414 0.0.0.0:* -
udp 0 0 10.0.2.100:34263 0.0.0.0:* -
udp 0 0 0.0.0.0:1901 0.0.0.0:* -
My reading of that is that PMS will only respond to incoming requests on port 32400 when originating from within the container and targeting the loopback address (127.0.0.1). This is supported by curl commands run within the container:
# curl http://127.0.0.1:32400
<html><head><script>window.location = window.location.href.match(/(^.+\/)[^\/]*$/)[1] + 'web/index.html';</script><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html># curl http://10.0.2.100:32400
curl: (7) Failed to connect to 10.0.2.100 port 32400: Connection refused
From outside the container:
curl http://localhost:32400
curl: (56) Recv failure: Connection reset by peer
Is there a way to tell PMS within the container to bind to all ip addresses/adapters?