Skip to content

[BUG] go2rtc not starting - breaking HA install (fresh) #124

@perry-mitchell

Description

@perry-mitchell

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

On a fresh install of home assistant, I get fatal errors with go2rtc. It results in the pod eventually starting, but in a broken state. The UI constantly stops responding and many aspects of the system don't work (automations).

I did not experience these some weeks ago, but since updating recently (I don't recall when) HA has refused to start correctly (if at all), presumably due to these errors. Sometimes the web UI isn't available, sometimes it is and it's busy being broken:

Image Image Image

I am not using any cameras and my HA installation is benign, imo - almost entirely MQTT (via Mosquitto / Z2M). It was failing on my existing configuration, so I wiped it and started fresh, and still see the same.

Expected Behavior

Home assistant should start normally without error.

Steps To Reproduce

Setup vanilla HA install using linuxserver image, set to latest or 2025.2.5 tag.

Environment

- OS: K3s / Debian x86/x64 host
- Env:
    PGID: 100
    PUID: 99
    TZ: Europe/Helsinki

CPU architecture

x86-64

Docker creation

Setup via OpenTofu on k3s, using a basic deployment resource. Description of pod:


Name:             homeassistant-f5f8d5dcc-nv5xl
Namespace:        smart-home
Priority:         0
Service Account:  default
Node:             acheron-master-03/192.168.<snip>
Start Time:       Sat, 22 Feb 2025 17:37:13 +0200
Labels:           application=homeassistant
                  pod-template-hash=f5f8d5dcc
Annotations:      kubectl.kubernetes.io/restartedAt: 2025-02-17T21:46:03+02:00
Status:           Running
IP:               10.42.1.153
IPs:
  IP:           10.42.1.153
Controlled By:  ReplicaSet/homeassistant-f5f8d5dcc
Containers:
  homeassistant:
    Container ID:   containerd://92144a998e68d2f0925c7fbc39123a155649e441ce193c6e5b430ef4904c5df5
    Image:          lscr.io/linuxserver/homeassistant:2025.2.5
    Image ID:       lscr.io/linuxserver/homeassistant@sha256:573b40630c615e15940b56290ace3d1b4472829feab951ede512df7a68c7b772
    Port:           <none>
    Host Port:      <none>
    State:          Running
      Started:      Sat, 22 Feb 2025 17:37:46 +0200
    Ready:          True
    Restart Count:  0
    Environment:
      PGID:  100
      PUID:  99
      TZ:    Europe/Helsinki
    Mounts:
      /config from config (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-v2xg8 (ro)
Conditions:
  Type                        Status
  PodReadyToStartContainers   True 
  Initialized                 True 
  Ready                       True 
  ContainersReady             True 
  PodScheduled                True 
Volumes:
  config:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  nfs-homeassistant-config
    ReadOnly:   false
  kube-api-access-v2xg8:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  11m   default-scheduler  Successfully assigned smart-home/homeassistant-f5f8d5dcc-nv5xl to acheron-master-03
  Normal  Pulling    11m   kubelet            Pulling image "lscr.io/linuxserver/homeassistant:2025.2.5"
  Normal  Pulled     11m   kubelet            Successfully pulled image "lscr.io/linuxserver/homeassistant:2025.2.5" in 32.254s (32.254s including waiting). Image size: 573003061 bytes.
  Normal  Created    11m   kubelet            Created container: homeassistant
  Normal  Started    11m   kubelet            Started container homeassistant

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────
Linuxserver.io version: 2025.2.5-ls80
Build-date: 2025-02-21T22:57:56+00:00
───────────────────────────────────────
    
**** New container detected, fixing python package permissions. This may take a while. ****
Setting permissions
[custom-init] No custom files found, skipping...
Connection to localhost (::1) 8123 port [tcp/*] succeeded!
[ls.io-init] done.
2025-02-22 17:38:10.634 ERROR (MainThread) [homeassistant.components.http.forwarded] A request from a reverse proxy was received from 10.42.4.21, but your HTTP integration is not set-up for reverse proxies
2025-02-22 17:38:15.330 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
2025-02-22 17:38:15.365 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=1 from 2025-02-22 15:38:02.687242)
Connection to localhost (::1) 8123 port [tcp/*] succeeded!
2025-02-22 17:38:17.509 WARNING (MainThread) [homeassistant.components.go2rtc.server] 17:38:17.509 ERR [rtsp] listen error="listen tcp 127.0.0.1:18554: bind: address already in use"
2025-02-22 17:38:17.509 WARNING (MainThread) [homeassistant.components.go2rtc.server] 17:38:17.509 ERR [api] listen error="listen tcp 127.0.0.1:11984: bind: address already in use"
2025-02-22 17:38:24.564 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for home-assistant-voice-09254b @ 192.168.80.75: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.80.75', port=6053))]: [Errno 113] Connect call failed ('192.168.80.75', 6053) (SocketAPIError)
2025-02-22 17:38:27.434 WARNING (MainThread) [homeassistant.setup] Setup of go2rtc is taking over 10 seconds.
2025-02-22 17:38:47.437 ERROR (MainThread) [homeassistant.components.go2rtc.server] Go2rtc server didn't start correctly
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/homeassistant/components/go2rtc/server.py", line 127, in _start
    await self._startup_complete.wait()
  File "/usr/local/lib/python3.13/asyncio/locks.py", line 213, in wait
    await fut
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/homeassistant/components/go2rtc/server.py", line 126, in _start
    async with asyncio.timeout(_SETUP_TIMEOUT):
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/timeouts.py", line 116, in __aexit__
    raise TimeoutError from exc_val
TimeoutError
2025-02-22 17:38:47.439 WARNING (MainThread) [homeassistant.components.go2rtc.server] 17:38:17.508 INF go2rtc platform=linux/amd64 revision=199fdd6 version=1.9.8
2025-02-22 17:38:47.439 WARNING (MainThread) [homeassistant.components.go2rtc.server] 17:38:17.508 INF config path=/tmp/go2rtc_75zlgsaf.yaml
2025-02-22 17:38:47.439 WARNING (MainThread) [homeassistant.components.go2rtc.server] 17:38:17.509 ERR [rtsp] listen error="listen tcp 127.0.0.1:18554: bind: address already in use"
2025-02-22 17:38:47.439 WARNING (MainThread) [homeassistant.components.go2rtc.server] 17:38:17.509 ERR [api] listen error="listen tcp 127.0.0.1:11984: bind: address already in use"
2025-02-22 17:38:47.439 WARNING (MainThread) [homeassistant.components.go2rtc.server] 17:38:17.509 INF [webrtc] listen addr=:18555/tcp
2025-02-22 17:38:47.439 WARNING (MainThread) [homeassistant.components.go2rtc.server] exit with signal: terminated
2025-02-22 17:38:47.440 WARNING (MainThread) [homeassistant.components.go2rtc] Could not start go2rtc server
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/homeassistant/components/go2rtc/server.py", line 127, in _start
    await self._startup_complete.wait()
  File "/usr/local/lib/python3.13/asyncio/locks.py", line 213, in wait
    await fut
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/homeassistant/components/go2rtc/server.py", line 126, in _start
    async with asyncio.timeout(_SETUP_TIMEOUT):
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/timeouts.py", line 116, in __aexit__
    raise TimeoutError from exc_val
TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/homeassistant/components/go2rtc/__init__.py", line 129, in async_setup
    await server.start()
  File "/usr/local/lib/python3.13/site-packages/homeassistant/components/go2rtc/server.py", line 98, in start
    await self._start()
  File "/usr/local/lib/python3.13/site-packages/homeassistant/components/go2rtc/server.py", line 133, in _start
    raise Go2RTCServerStartError from err
homeassistant.components.go2rtc.server.Go2RTCServerStartError: Go2rtc server didn't start correctly

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