You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] docker-compose: otel-collector/prometheus/grafana take dynamic IPs from 10.10.10.0/24 and can grab 10.10.10.2, nostream fails with "Address already in use" #929
Describe the bug docker-compose.yml pins nostream, nostream-db and nostream-cache to 10.10.10.2–10.10.10.4, but otel-collector, prometheus and grafana (added with the observability stack) take dynamic addresses from the same 10.10.10.0/24 pool. Docker hands out dynamic addresses from the bottom of the subnet, so whichever of them is created first grabs 10.10.10.2 and nostream then fails:
Error response from daemon: failed to set up container networking: Address already in use
otel-collector has no dependencies, so it is usually created before nostream; it also happens after a host reboot, when the daemon starts containers in arbitrary order.
To Reproduce
docker compose down (network removed), then docker compose up -d.
docker network inspect nostream → otel-collector=10.10.10.2/24; nostream stays in Created with the error above.
Expected behavior
Dynamic addresses never collide with the static ones.
System
OS: Ubuntu 22.04, Docker 29.9, compose v5.4
Version: 3.4.1
Fix (running in production)
Restrict dynamic allocation to a range outside the static addresses; subnet and gateway stay the same (10.10.10.1 is in the default trustedProxies):
This also keeps .5 (docker-compose.local.yml) and .252/.253 (i2p/tor overlays) out of the dynamic pool. After this change: nostream=10.10.10.2, otel-collector=10.10.10.128, prometheus=10.10.10.129, grafana=10.10.10.130. Happy to send it as a PR, but PR creation on this repo is limited for me (see #927).
Activity
fix(compose): confine dynamic addresses to 10.10.10.128/26 (cameri#972)