I had two hosts running the consul-registrator services. The registrator is passed an URL to consul: consul://consul:8500. Looking up consul in the container will return both host IPs in a round-robin fashion, meaning the services that are registered in consul often have the wrong IP adress! I found a way to fix that, but it feels a bit hacky. Wanted to document it here, so it can help other people and/or potentially be integrated into the catalog entry in one way or the other.
actually, i think you could fix this by configuring registrator to point to the docker bridge IP. Since the consul container is binding 8500 to the host, can you try this:
I had two hosts running the consul-registrator services. The registrator is passed an URL to consul:
consul://consul:8500
. Looking upconsul
in the container will return both host IPs in a round-robin fashion, meaning the services that are registered in consul often have the wrong IP adress! I found a way to fix that, but it feels a bit hacky. Wanted to document it here, so it can help other people and/or potentially be integrated into the catalog entry in one way or the other.Instead of
I added:
Important: Make sure the command is in shell form so the backquote command gets executed.