使用领事注册器时,ServiceAddress为空
这是我从查询领事服务API(/v1/catalog/service/service1)得到的结果 用于启动注册器和服务的命令:使用领事注册器时,ServiceAddress为空,service,infrastructure,consul,devops,Service,Infrastructure,Consul,Devops,这是我从查询领事服务API(/v1/catalog/service/service1)得到的结果 用于启动注册器和服务的命令: [ { "Node": "consul-staging-a-1.org", "Address": "10.0.11.221", "ServiceID": "mesos-slave-staging-a-1.org:determined_bartik:5000", "ServiceName": "service1", "Servi
[
{
"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
}
]
我做错了什么步骤了吗?如何将主机名分配给ServiceAddress字段?我也有类似的问题,发现在v6 Consor Registrator将ServiceAddress保留为空之前,但在v6(目前最新版本)中,它是“0.0.0.0”。我曾尝试使用“-ip”选项,但它并没有帮助,它以某种方式分配容器的内部ip地址。发现相关问题,请访问:
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
docker run -d -p 10.0.0.3:4003:5000 -e "SERVICE_NAME=service1" docker-training/hello-world