-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
On 12.1, swarm service running on one node cannot resolve hostname of service running on another node #27218
Comments
@anthonyserious The problem is more likely to be the combination of using a Ubuntu VM and Docker4Mac. Can you provide more information about the environment i.e how the docker swarm was initalized like what were the exact command line options used in |
Smells like #25266 to me. |
Thanks for the replies. I'm still trying some things and will get the requested info - apologies for the delay. @mrjana yes, it appears to be very much specific to docker4mac native, since the "equivalent" setup with a node on a Linux laptop works fine. |
yes, need testing PTAL! |
ping @anthonyserious. Any update on this? It seems trying to form a swarm cluster between a linux VM and docker4mac is not going to work out of the box. Not sure what we do with this bug. May be mark it as |
Hi @mrjana, sorry for the delay here. We tried upgrading Linux and docker4mac to docker 12.2 beta, still having the same issue. Rebuilt the swarm and overlay network multiple times...same thing. Something interesting, perhaps, is that for the overlay network, running I cannot even ping the IP address for a container running on a different node, so it's not just the resolver failure. I was going to ask if using an external K/V store could possibly work, but given that hosts are unreachable across the overlay network even by IP address then I think it's not worth it. One thought - is it possible that since docker4mac is running behind a hypervisor that I need to explicitly advertise the underlying IP address for docker? I'm not even sure how to modify commandline arguments for docker4mac, so would appreciate any guidance so I can play around with that. Thanks! |
@anthonyserious yes. this is the expected behavior for Docker4mac. I havent tried this myself though (which I think I should). ping @justincormack has anyone tried such a setup with docker4mac and external linux system participating in a swarm cluster with a public facing @anthonyserious Also, |
Let me close this ticket for now, as it looks like it went stale. |
On 12.1, swarm service running on one node cannot resolve hostname of service running on another node
With a simple 2-node (including the one master node), and services running on the same overlay network, services containers running on one node can't resolve the hostname of containers running on the other node. I have tried several different overlay network subnets including 10.x/24, 192.168.x/24, 172.21.x/24.
1st node is docker 12.1 on Ubuntu, 2ns is docker 12.1 on Mac OS X El Capitan.
NOTE: the choice of mongo and redis images here is arbitrary - it's the same behavior experienced with proprietary node.js services running on centos:latest.
Steps to reproduce the issue:
docker network create -d overlay --subnet=10.127.127.0/24 test6
docker service create --network test6 --name redis --constraint "engine.labels.location == cloud" redis:latest
docker service create --network test6 --name mongo --constraint "engine.labels.location == local" -p 27017:27017 mongo:latest
ping redis
from the mongo containerFrom the second node:
Describe the results you received:
Describe the results you expected:
The
redis
hostname should be resolved.Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Master
Secondary
Output of
docker info
:Master
Secondary
Additional environment details (AWS, VirtualBox, physical, etc.):
1st node is docker 12.1 on Ubuntu 14.04 LTS, 2nd is docker 12.1 on Mac OS X El Capitan.
The text was updated successfully, but these errors were encountered: