Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[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"

Đang mở Phù hợp với người mới
#929 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
83/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker-compose
Lĩnh vực
devops

Hướng nghiên cứu

Bắt đầu với docker-compose.yml và kiểm tra cấu hình IPAM của mạng mặc định cùng với các địa chỉ tĩnh được mô tả trong issue. Đặt phạm vi cấp phát động nằm ngoài các địa chỉ được dành riêng, sau đó chạy docker compose down và docker compose up -d, rồi kiểm tra mạng nostream; công việc hoàn tất khi mọi dịch vụ khởi động với các địa chỉ động nằm ngoài các địa chỉ được gán tĩnh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
TypeScript
Star
829
Fork
234
Merge trung bình
16 giờ 13 phút
Pull request đã merge (30 ngày)
74

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cameri/nostream

Tất cả issue của cameri/nostream

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.