homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

IPv6 issue on first run. Need to disable IPv6 in container #546

Closed schafdog closed 5 months ago

schafdog commented 5 months ago

Current Situation

New to HB.

Starting the image with the docker-compose as described for the first time.

It didn't find an installation of homebridge, so it tries to fetch, hangs for a long and the the stack traces show it is attempting IPv6. I don't have IPv6 from my ISP and also not a HE tunnel (IPv6 over IPv4) on my router

I noticed an he interface inside the running docker, but any ping over this failed. I didn't find tunnel configuration, but maybe I wasn't looking the right place

I configured IPv4 priority higher that IPv6 in gai.conf and the installation started and completed

Docker Config

root@nuc:~/docker/homebridge# cat docker-compose.yaml 
version: '2'
services:
  homebridge:
    image: homebridge/homebridge:latest
    restart: always
    network_mode: host
    volumes:
      - ./volumes/homebridge:/homebridge
    logging:
      driver: json-file
      options:
        max-size: "10mb"
        max-file: "1"

Logs

[1/8/2024, 10:34:21 PM] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[1/8/2024, 10:34:21 PM] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
-----
I cannot find it in the logs but it was clearly using an IPv6 address

Host Operating System

Ubuntu / Debian (or a variant)

Host Architecture

x86_64 / amd64

schafdog commented 5 months ago

Is there a way to start the container without using IPv6? Should it automatic create a HE IPv6 but failed?

Is there something I can do to debug the problem? I can restore standard priority.

NorthernMan54 commented 5 months ago

This sounds like an issue with your docker or host configuration. Have you tried just disabling ipv6 in the host os ?

schafdog commented 5 months ago

Right. I must have played with he on the host at some point.