jellyfin/jellyfin-plugin-tvheadend

Problem connecting tvheadend inside docker

lopiv2 opened this issue · 1 comments

When configuring TvHeadend plugin in jellyfin with Tvheadend installed in another docker, this error appears in portainer:
[20:14:13] [ERR] [15] TVHeadEnd.LiveTvService: [TVHclient] HTSConnectionAsync.open: caught exception

System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000005, 0xFFFDFFFF): Name or service not known

at System.Net.Dns.InternalGetHostByName(String hostName)

at System.Net.Dns.GetHostEntry(String hostNameOrAddress)

at TVHeadEnd.HTSP.HTSConnectionAsync.open(String hostname, Int32 port)

I have Jellyfin and TVHeadend running in docker. I use macvlan to give each of them their own IP address. Not sure if this will help you, but in case you want to try it, here's my docker-compose.yml:

version: "3.6"

networks:
  vlan:
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: 192.168.1.0/24

services:

  jellyfin:
    image: "jellyfin/jellyfin"
    container_name: "jellyfin"
    restart: unless-stopped
    user: ${PUID}:${PGID}
    networks:
      vlan:
        ipv4_address: 192.168.1.240
    devices:
      - /dev/dri:/dev/dri
    volumes:
      - ${USERDIR}/docker/jellyfin:/config
      - ${USERDIR}/docker/cache/jellyfin:/cache
      - ${USERDIR}/media:/data:ro
      - ${USERDIR}/Downloads/dvr:/dvr
      - /dev/shm:/ram_transcode

  tvheadend:
    image: "linuxserver/tvheadend"
    container_name: "tvheadend"
    restart: unless-stopped
    networks:
      vlan:
        ipv4_address: 192.168.1.241
    devices:
      - /dev/dri:/dev/dri
    volumes:
      - ${USERDIR}/docker/tvheadend:/config
      - ${USERDIR}/docker/picons:/picons:ro
      - ${USERDIR}/Downloads/dvr:/recordings
      - ${USERDIR}/media/tvguide:/config/data:ro
      - /dev/shm:/ram_transcode
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}

  zap2xml:
    image: "watersworks/zap2xml"
    container_name: "zap2xml"
    restart: unless-stopped
    user: ${PUID}:${PGID}
    volumes:
      - ${USERDIR}/media/tvguide:/data
    environment:
      - USERNAME=${TVGUIDE_EMAIL}
      - PASSWORD=${TVGUIDE_PASSWORD}
      - OPT_ARGS=-z -d 14 -n 2 -N 2

Note that my variables are declared in /etc/environment