Skip to content

[BUG] CNAME resolution does not work properly #255

@bokysan

Description

@bokysan

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hello,

CNAME resolution does not work.

Actual result:

  1. ping: bad address 'demo.example.org'
  2. nslookup works but returns ** server can't find demo.example.org: NXDOMAIN
  3. dig actually works.

Expected result:

  1. All three tools work

This issue arises due to incomplete or incorrect DNS resolution in Alpine’s musl libc implementation, which ping, getaddrinfo(), and others depend on. dig uses its own resolver (bypassing libc).

This wouldn't be a problem otherwise, but connecting different clients in Radarr ends up with Unable to connect to .... errors.

Expected Behavior

  1. All three tools work

Steps To Reproduce

  1. configure Radarr (via DOCKER) to point to an internal server (e.g. 192.168.8.1)
  2. setup: demo.example.org CNAME demo2.example.org, demo2.example.org A 192.168.8.10
  3. Do apk add bind-tools in the docker container
  4. Try doing ping demo.example.org.
  5. Try doing nslookup demo.example.org.
  6. Try doing dig demo.example.org

Environment

Tested with

Linuxserver.io version: 5.26.2.10099-ls276
Build-date: 2025-06-15T04:52:48+00:00
Version 5.26.2.10099

CPU architecture

x86-64

Docker creation

  radarr:
    image: ghcr.io/linuxserver/radarr:latest
    container_name: radarr
    environment:
      - PUID=1038
      - PGID=100
      - VERSION=latest
      - TZ=Europe/Berlin
    ports:
      - 7878:7878
    labels:
      - "traefik.enable=true"
      - "traefik.http.services.radarr.loadbalancer.server.port=7878"
      - "traefik.http.routers.radarr.rule=Host(`r.example.com`)"
      - "traefik.http.routers.radarr.entrypoints=websecure"
      - "traefik.http.routers.radarr.tls.certresolver=le"
      - "traefik.http.routers.radarr-insecure.rule=Host(`r.example.com`)"
      - "traefik.http.routers.radarr-insecure.entrypoints=web"
      - "traefik.http.middlewares.radarr-insecure.redirectscheme.scheme=https"
      - "traefik.http.middlewares.radarr-insecure.redirectscheme.permanent=true"
    volumes:
      - ./radarr:/config
      # This was added as a method of trying to resolve the issue. It did not help
      - ./radarr-resolv.conf:/etc/resolv.conf:ro
      # This is the only way to resolve the issue, to hardcode the hosts
      - ./radarr-hosts:/etc/hosts:ro
      - /mnt/media/:/media
    restart: unless-stopped
    dns:
      - 192.168.8.1
    networks:
      - traefik_public
    deploy:
      resources:
        limits:
          cpus: '0.25'
          memory: 256M
        reservations:
          cpus: '0.05'
          memory: 50M
    logging:
      driver: "json-file"
      options:
        max-size: "50m"

Container logs

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions