Skip to content

[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

Closed

Description

@Perlover

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

  1. docker compose down (network removed), then docker compose up -d.
  2. 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):

networks:
  default:
    name: nostream
    ipam:
      driver: default
      config:
        - subnet: 10.10.10.0/24
          gateway: 10.10.10.1
          ip_range: 10.10.10.128/26

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

  1. self-assigned this
    on Oct 24, 2026
  2. added a commit that references this issue on Oct 28, 2026
    a46ae06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions