node-red / node-red/node-red.github.io

Linking containers example not working any more

オープン
#207 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

主要言語
JavaScript
スター
118
フォーク
161
平均マージ
8時間 18分
マージ済み PR(30日)
4

説明

In the section about linking containers the example to link mosquitto by a bridge network dosn't work with mosquitto:latest (2.0.7), but with the last 1.6.13 seams that the config file of Mosquitto 2 is different and not listening to the network by default.

If I look into the container log I get:

1614083867: mosquitto version 2.0.7 starting
1614083867: Config loaded from /mosquitto/config/mosquitto.conf.
1614083867: Starting in local only mode. Connections will only be possible from clients running on this machine.
1614083867: Create a configuration file which defines a listener to allow remote access.
1614083867: Opening ipv4 listen socket on port 1883.
1614083867: Opening ipv6 listen socket on port 1883.
1614083867: Error: Address not available
1614083867: mosquitto version 2.0.7 running

by altering the docker command to:

docker run -itd --network iot --name mybroker eclipse-mosquitto:1.6.13

it works like expected. So two solutions:

  1. using the command like above with the last 1.6 Mosquitto
  2. Providing an docker image with adapted mosquitto.conf file to enable listener 1883 and allow_anonymous true to have the same behavior for the latest mosquitto.

Dockerfile could look like:

FROM eclipse-mosquitto:latest

RUN echo "listener 1883" >> /mosquitto/config/mosquitto.conf
&& echo "allow_anonymous true" >> /mosquitto/config/mosquitto.conf

VOLUME ["/mosquitto/data", "/mosquitto/log"]

EXPOSE 1883
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]

Best Christian

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

Docker の入門ドキュメントにある「linking containers」セクションから始め、現在のイメージを使ってその Mosquitto の例を再現してください。結果を Mosquitto 1.6.13 および報告されている listener 設定と比較してください。サポート対象の Mosquitto バージョンでドキュメントの例が動作し、必要な設定またはバージョン固定が明確に含まれていれば完了です。

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

評価

技術スタック
docker
領域
devops, documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

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

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