Git Product home page Git Product logo

Comments (13)

iwalz avatar iwalz commented on June 7, 2024 1

Same for me - I'd like to get rid of the overhead for running consul-agent on the whole coreos cluster.
Registrator would be the perfect fit since it's located on all machines anyway.

from registrator.

owaaa avatar owaaa commented on June 7, 2024

Tried multiple times and this always happens if I register against a consul server IP. I was only able to get registrator to work by using the docker socket IP and also running the consul-agent in a sidecar container

from registrator.

sfitts avatar sfitts commented on June 7, 2024

I noticed the same behavior and it appears to be intentional. If you look at the consul registration code it only creates a "service" entry via the target consul agent. From what I can tell (though I'm hardly a consul expert) this type of entry does not have an associated IP address, rather it is associated with a "node" in consul which is what holds the Host/IP of the service. When you register a service directly with the agent that agent becomes the service's node -- thus any service you register will appear as if it is running on the agent's host. As a result you need to do what you suggest and run a consul sidecar on every host where you register Docker services.

From what I can tell it would be possible for the registration code to register both a Node and a Service so that even hosts without a consul agent could contain services. Doing so (or providing the option to do so) would make it work more like SkyDNS/Etcd both of which do register host and port.

from registrator.

defender avatar defender commented on June 7, 2024

Do you have any eta for this ?

Thanks.

from registrator.

fliphess avatar fliphess commented on June 7, 2024

Im trying to loadbalance between dockers on the same host, is it possible to advertise the docker ip in any way?

from registrator.

andyshinn avatar andyshinn commented on June 7, 2024

@fliphess you can do something like that using the -internal switch when using etcd as a backend. But at the moment, Consul will only register services under its IP.

from registrator.

enpassant avatar enpassant commented on June 7, 2024

I've made a kind of solution, it is testable.
Github: https://github.com/enpassant/registrator
Docker: https://registry.hub.docker.com/u/enpassant/registrator/

from registrator.

mgood avatar mgood commented on June 7, 2024

Did merging PR #93 fix this then?

from registrator.

lox avatar lox commented on June 7, 2024

What was the outcome of this? Due to the bug with docker/consul and arp caching I've got to run my consul instance with -net=host. Now all of my docker containers get registered with the private ip of the docker host, rather than the private ip of the docker containers.

moby/moby#4581
gliderlabs/docker-consul#26

from registrator.

cgcgbcbc avatar cgcgbcbc commented on June 7, 2024

It seems that this registrator aims at register service at local agent, so maybe you need to run a agent on 10.10.2.55 and change the registrator url to consul://10.10.2.55:8500

from registrator.

progrium avatar progrium commented on June 7, 2024

Yeah, you should either run the Consul agent locally (it's intended to be run on all hosts), but I believe the latest version will use the IP that Registrator determines (which is best set with -ip).

See docs:
http://gliderlabs.com/registrator/latest/user/run/

Reopen if still an issue.

from registrator.

ChrisMcKenzie avatar ChrisMcKenzie commented on June 7, 2024

I am seeing this occur even if registrator has the -ip flag set.

from registrator.

 avatar commented on June 7, 2024

Same problem here, also with -ip flag - works fine when using local consul.

from registrator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.