Sorun:
Docker’laştırılmış bir emqx kurulumunda, şuna benzer bir komut kullanarak emqx_ctl çalıştırmaya çalıştığınızda
emqx_docker_status.sh
docker-compose exec emqx ./bin/emqx statusşuna benzer bir hata mesajı görürsünüz:
emqx_node_not_responding.txt
Node 'emqx@node1.emqx.mydomain.com' not responding to pings.
/opt/emqx/bin/emqx: line 41: die: command not foundÇözüm
Buradaki sorun, emqx_ctl‘in node1.emqx.mydomain.com için IP adresine bağlanmaya çalışması, ancak bu IP adresinin docker konteynerinin IP adresini göstermemesidir (belki de sunucunuzun genel IP adresidir?)
Buradaki çözüm, Docker DNS sisteminin node1.emqx.mydomain.com‘u konteynerin dahili IP adresine çözmesi için docker/docker-compose içinde bir ağ takma adı oluşturmaktır.
Örneğin, docker-compose‘da ağınızı şunu kullanarak oluşturabilirsiniz:
docker_networks_emqx.yml
networks:
emqx:
driver: bridgeve ardından şunu kullanarak konteyner için takma adı yapılandırın:
docker_compose_emqx_service.yml
services:
emqx:
image: emqx:4.4.4
environment:
- "EMQX_NAME=emqx"
- "EMQX_HOST=node1.emqx.mydomain.com"
- "EMQX_LOADED_PLUGINS=emqx_recon,emqx_retainer,emqx_management,emqx_dashboard"
ports:
- 18083:18083
- 1883:1883
volumes:
- ./emqx_data:/opt/emqx/data
- ./emqx_log:/opt/emqx/log
networks:
emqx:
aliases:
- "node1.emqx.mydomain.com"
Check out similar posts by category:
Konteynerler Docker EMQX MQTT
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow