Skip to content

fix(utilities): bind feederhub on 0.0.0.0 (IPv4) to fix Traefik 504 Gateway Timeout

jedmund requested to merge fix/feederhub-bind-ipv4 into main

Summary

`https://cat.atelier.house\` is returning 504 Gateway Timeout from Traefik.

Root cause: Go's `net.Listen("tcp", ":18080")` (the shape the env-var was emitting) produces an IPv6 dual-stack socket only. `ss -4 -tlnp` shows nothing on :18080; `ss -6 -tlnp` shows `*:18080`. With `net.ipv6.bindv6only=0` the kernel will route IPv4 → IPv4-mapped IPv6, but only for direct local delivery — packets arriving from inside a Docker bridge to the host's LAN IP don't traverse that mapping reliably.

Empirical diff vs Netdata (also on host network)

``` $ ss -4 -tlnp | grep -E ':18080|:19999' LISTEN 0 4096 0.0.0.0:19999 ... # netdata — works

$ ss -6 -tlnp | grep -E ':18080|:19999' LISTEN 0 4096 [::]:19999 ... # netdata also has IPv6 LISTEN 0 4096 *:18080 ... # feederhub — IPv6 only

$ docker exec traefik wget -qO- http://192.168.1.6:18080/health wget: download timed out $ docker exec traefik wget -qO- http://192.168.1.6:19999 <!doctype html>... # netdata reachable ```

Fix

`FEEDERHUB_LISTEN=0.0.0.0:18080` makes Go open a pure IPv4 listener. Loses IPv6 support but feederhub isn't reachable on a public v6 address anyway — it's behind Traefik (v4-routed) and consumed only by HA on NUC8 + browsers via cat.atelier.house.

If we ever care about v6 we'd need to listen on both families explicitly (two `net.Listen` calls in feederhub) — separate issue.

Test plan

Merge request reports

Loading