-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consul service registration and DNS #75
Comments
Turns out that other services registered with registrator also do not resolve, I was wrong about that. |
Are you using an alpine-based container? |
For registrater, yes: FROM gliderlabs/alpine:3.1 ENTRYPOINT ["/bin/registrator"] COPY . /go/src/github.com/gliderlabs/registrator RUN apk-install -t build-deps go git mercurial \ && cd /go/src/github.com/gliderlabs/registrator \ && export GOPATH=/go \ && go get \ && go build -ldflags "-X main.Version $(cat VERSION)" -o /bin/registrator \ && rm -rf /go \ && apk del --purge build-deps On Mon, Aug 31, 2015 at 3:30 AM, John Days [email protected] wrote:
|
Hmm, if you were using it for other services, there is actually a problem with the dns search http://wiki.musl-libc.org/wiki/Functional_differences_from_glibc#Name_Resolver_.2F_DNS |
First of all, if I run:
$ docker run -d -p 8400:8400 -p 8500:8500 -p 8600:53/udp -h consul --name=consul progrium/consul -server -bootstrap -ui-dir /ui
$ curl http://$(docker-machine ip local):8500/v1/catalog/service/consul
[{"Node":"consul","Address":"172.17.0.17","ServiceID":"consul","ServiceName":"consul","ServiceTags":[],"ServiceAddress":"","ServicePort":8300}]
Why is "ServiceAddress" blank?
Then, when I run one of my containers:
cat /etc/resolv.conf
nameserver 172.17.42.1
nameserver 8.8.8.8
search service.consul
But:
ping consul
ping: unknown host consul
I noticed in Dockerfile (master), its using docker 1.5. I am using 1.6. So I tried my own image build with 1.6 but I get the same results.
I can ping:
ping 172.17.42.1
PING 172.17.42.1 (172.17.42.1) 56(84) bytes of data.
64 bytes from 172.17.42.1: icmp_seq=1 ttl=64 time=0.144 ms
and when I use registrator and run another service, that service does resolve properly. So it seems that the consul container itself is the one having problems.
** I am on OSX, using docker-machine.
The text was updated successfully, but these errors were encountered: