Comments (11)
Consul overrides the IP, so that option doesn't work with that backend. Key
value works though. Consul should fix this soon.
On Wednesday, September 17, 2014, Daniel Schierbeck <
[email protected]> wrote:
I'm having trouble forcing the IP address of the services to be the host's
address rather than the consul container's. I'm launching the registrator
container like this:docker run --rm -v /var/run/docker.sock:/tmp/docker.sock --name registrator.1 --link consul.1:consul progrium/registrator -ip 192.168.140.2 consul://consul:8500
... yet all the services are defined with the consule container's IP
anyway. It actually took me a while to realize that the IP and port of the
services corresponded to the host rather than the containers themselves.Am I doing something wrong?
—
Reply to this email directly or view it on GitHub
https://github.com/progrium/registrator/issues/23.
Jeff Lindsay
http://progrium.com
from registrator.
@dasch : If it can help, for now, I mitigate that issue by starting progrium/docker-consul using the -net=host switch. This cause consul to bind to the host IP.
Which end up with registrator registering it's service under the (host) IP you are expecting. This also make starting consul a bit more straigtforward, ex:
docker run --net=host --name consul progrium/consul-docker -server -bootstrap
from registrator.
@pfcarrier that worked, thanks! I had to run registrator on the host net as well.
from registrator.
Is there a link to the issue on the consul repo?
from registrator.
from registrator.
Is there a way to force a service IP address to be the service container's IP?
It seems the only options with consul are service-IP==consul-IP
or service-IP==host-IP
from registrator.
I fixed this by running -advertise PUBLICIP when launching your docker consul container.
from registrator.
Can this be fixed yet? The -advertise trick works fine as long as all the service containers are running on the same Docker host as the Consul container.
But if you're running registrator on a different Docker host than the one Consul is on, the IP is wrong again.
HTTP API supports setting a custom IP per service now, so is it possible? Thanks!
from registrator.
You can force the IP with -ip
. And yes it works with Consul now. I think only in master though.
from registrator.
Aha. Yes, after switching to master -ip works fine. This is great.
from registrator.
Fixed by #91 (Currently only in master.)
from registrator.
Related Issues (20)
- Not able to get POD IP for registration in EKS
- unsupported protocol scheme ""
- Cannot unmarshal number into Go value of type string HOT 1
- Support for newer versions of Consul HOT 10
- Support for 3.x version of etcd HOT 2
- Dead link in website
- cannot connect to Docker endpoint
- Unregister on 'stop'
- Health checks with SERVICE_CHECK_SCRIPT doesn't work HOT 1
- Possible bug (or by-design behavior) of using IPv6 addresses to register TCP health check to `Consul`?
- http://gliderlabs.com/ is down HOT 1
- Image docker.io/gliderlabs/registrator:latest uses outdated schema1 manifest format HOT 2
- Require image for ARM64 architecture HOT 3
- gliderlabs.com is down HOT 1
- All service names start with sha265 when containers are started with the new compose-cli HOT 3
- Takeover the project HOT 7
- I would like to add support for excluding some containers
- Not an issues | Registrator Updated / Fork HOT 2
- Fork of this project and an open invitation to participate. HOT 1
- Registrator not picking the events everytime
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from registrator.