Docker Community Forums

Share and learn in the Docker community.

Cannot ping jellyfin macvlan IP

Hi, new to this forum.

I am currently setting up jellyfin/jellyfin docker. I have traefik to handle 80 -> 8096 and cloudflare to handle SSL, no problem at all.

The only concern is DLNA. I have created a macvlan with the following detail:

[
{
“Name”: “jellyfin-macvlan”,
“Id”: “ef2ba26926286dce21ba861cd67a690d84da0bb0b77b4556b400c6832b77afc2” ,
“Created”: “2020-12-01T11:16:47.268703518+08:00”,
“Scope”: “local”,
“Driver”: “macvlan”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: null,
“Config”: [
{
“Subnet”: “172.16.10.0/24”
}
]
},
“Internal”: false,
“Attachable”: true,
“Ingress”: false,
“ConfigFrom”: {
“Network”: “”
},
“ConfigOnly”: false,
“Containers”: {
“3904321af604c1f21d30228a3f1f2b827c6a226c9eafc76554f32c0ccf8bdc2f”: {
“Name”: “jellyfin”,
“EndpointID”: “084bcf750af88431c61c1e4eb535a752009e7743e4c5011b9 91f69065c04bc08”,
“MacAddress”: “02:42:ac:10:0a:a5”,
“IPv4Address”: “172.16.10.165/24”,
“IPv6Address”: “”
}
},
“Options”: {
“parent”: “eth0”
},
“Labels”: {
“com.docker.compose.network”: “jellyfin-macvlan”,
“com.docker.compose.project”: “docker_vol”,
“com.docker.compose.version”: “1.27.4”
}
}
]

The problem is that I cannot ping 172.16.10.165 from a win10 PC (not the docker host), so obviously the Win10 cannot find jellyfin DLNA server

Jelllyfin docker service is as follow:

jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
restart: unless-stopped
networks:
jellyfin-macvlan:
ipv4_address: 172.16.10.165
proxy: {}
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Hong_Kong
- UMASK_SET=<022>
labels:
- traefik.enable=true
- traefik.docker.network=proxy
- traefik.http.routers.jellyfin-secure.entrypoints=websecure
- traefik.http.routers.jellyfin-secure.rule=Host(media.mydomain.tld)
- traefik.http.routers.jellyfin-secure.service=jellyfin-service
- traefik.http.services.jellyfin-service.loadbalancer.server.port=8096
volumes:
- ‘/docker_vol/jellyfin/storage/config:/config’
- ‘/docker_vol/jellyfin/storage/mv:/data/mv’
- ‘/docker_vol/jellyfin/storage/movies:/data/movies’
ports:
- ‘7359:7359/udp’
- ‘1900:1900/udp’

networks:
proxy: #this is external traffic used by traefik
external: true
jellyfin-macvlan:
name: jellyfin-macvlan
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: 172.16.10.0/24

Any help would be appreciated, thanks!

I have deploy another test docker and attach it to the macvlan with the ip 172.16.10.166. I can ping 172.16.10.165 inside this test container.

So anything that is outside the container network, even the nodes are on the same subnet, are not pingable. Would it be anything wrong on the host machine? docker host is running alpine linux.

end up I found that I need to enable promiscuous mode on the esxi portgroup…

Install/Setup
Common Issue: Playback fails for certain media
One possible resolution to this issue is to remove the codecs folder:

rm -rf “~/.config/appdata/plex/Library/Application Support/Plex Media Server/Codecs”
Or place a custom init script in your config (ex: ~/.config/appdata/plex/custom-cont-init.d/00-plex-remove-codecs):

#!/usr/bin/with-contenv bash
set -euo pipefail
IFS=$’\n\t’

rm -rf “/config/Library/Application Support/Plex Media Server/Codecs”
echo “Codecs removed.”
This will run every time the container restarts.

Common Issue: Cannot Claim Server on First Run
If you are starting the Plex container for the first time and cannot claim your server to set it up there are 3 methods you can try to resolve the issue:

  1. Set the PLEX_CLAIM variable

docker stop plex
docker rm plex

removes the config folder for plex

!WARNING! do NOT do this if you have already setup your plex server and are having issues connecting to it, skip to option 3 instead

rm -rf ~/.config/appdata/plex

sudo nano ~/.docker/compose/.env

with the nano file editor open locate the PLEX_CLAIM variable

go to https://www.plex.tv/claim/ in your browser and get the claim token set your PLEX_CLAIM variable

the token expires in 5 minutes, so we’ll want to get the rest done quickly

ctrl+x to save and exit nano

ds -c up plex
Then try again to claim the server by visiting http://yourserverip:32400/web/index.html

  1. Host Network Mode
    If the first method does not work, edit your .env and set PLEX_NETWORK_MODE=host. Run ds -c and then attempt to claim your server. After claiming your server set PLEX_NETWORK_MODE= (back to blank).

  2. Claim helper script
    If the first and second methods both have not worked this script should make it happen.

docker exec -it plex /bin/bash

download the script

curl -L -o plex-claim-server.sh https://github.com/uglymagoo/plex-claim-server/raw/master/plex-claim-server.sh

make the script executable

chmod +x plex-claim-server.sh

go to https://www.plex.tv/claim/ in your browser and get the claim token and replace PLEX_CLAIM with this token in the next command, please use use the double quotes around your claim token

./plex-claim-server.sh “PLEX_CLAIM”

fix permissions

chown abc:abc “/config/Library/Application Support/Plex Media Server/Preferences.xml”

leave the container

exit

docker restart plex