service - ServiceAddress is empty when using Consul Registrator -
[ { "node": "consul-staging-a-1.org", "address": "10.0.11.221", "serviceid": "mesos-slave-staging-a-1.org:determined_bartik:5000", "servicename": "service1", "servicetags": null, "serviceaddress": "", "serviceport": 4003 }, { "node": "consul-staging-a-1.org", "address": "10.0.11.221", "serviceid": "mesos-slave-staging-a-1.org:angry_hypatia:5000", "servicename": "service1", "servicetags": null, "serviceaddress": "", "serviceport": 4007 } ] this querying consul service api (/v1/catalog/service/service1).
commands used start registrator , services:
docker run -d -v /var/run/docker.sock:/tmp/docker.sock -h $hostname gliderlabs/registrator consul://consul-staging-a-1.org:8500 docker run -d -p 4003:5000 -e "service_name=service1" docker-training/hello-world docker run -d -p 4007:5000 -e "service_name=service1" docker-training/hello-world any steps i'm doing wrong? how assign hostname serviceaddress field?
i had similar issue , found before v6 consul registrator leaves serviceaddress empty, in v6 (at moment latest) "0.0.0.0". i've tried use "-ip" option did not help, somehow assigns internal ip address of container. found related issues at:
in case fixed binding container ip address like:
docker run -d -p 10.0.0.3:4003:5000 -e "service_name=service1" docker-training/hello-world
Comments
Post a Comment