node-red / node-red/node-red.github.io
Linking containers example not working any more
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 118
- Fork
- 161
- Merge medio
- 8h 18m
- PR unite (30g)
- 4
Descrizione
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:
- using the command like above with the last 1.6 Mosquitto
- Providing an docker image with adapted mosquitto.conf file to enable
listener 1883andallow_anonymous trueto 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.confVOLUME ["/mosquitto/data", "/mosquitto/log"]
EXPOSE 1883
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
Best Christian
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con la sezione “linking containers” della documentazione introduttiva di Docker e riproduci il relativo esempio Mosquitto usando l’immagine corrente. Confronta il risultato con Mosquitto 1.6.13 e con la configurazione del listener segnalata. Il lavoro è completato quando l’esempio documentato funziona con la versione di Mosquitto supportata e include chiaramente qualsiasi configurazione necessaria o blocco della versione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker
- Ambito
- devops, documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100