Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[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 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
83/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker-compose
領域
devops

調査の方向性

docker-compose.ymlから始めて、issueに記載された静的アドレスと合わせて、デフォルトネットワークのIPAM設定を確認します。動的割り当て範囲を予約済みアドレスの範囲外に設定し、その後 docker compose down と docker compose up -d を実行して nostream ネットワークを確認します。すべてのサービスが静的割り当ての範囲外の動的アドレスで起動すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
829
フォーク
234
平均マージ
16時間 13分
マージ済み PR(30日)
74

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cameri/nostream のほかの issue

cameri/nostream の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。