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
In Swarm, overlay network IP address are not matching with the ip address found inside other service. #34546
Comments
The IP address you see in network inspect is the IP-address for tasks backing the service, this can be a single task (container) or multiple. When you ping
|
|
If there are 2 services app1 and app2, configured to have a single container each, when the app1 process running in the container project_app1_1 wants to talk to app2 on port 5000, should it talk on project_app2_2:5000 or app2:5000? Also, I do not see the app2 entry added in the /etc/hosts of the container for app1. In such a case, what does docker use as the DNS? |
the full name of the service is So other services in the stack can use
Docker uses an embedded DNS server that listens on 127.0.0.11, you'll see that configured as DNS in |
So from the original message on this thread, mqm_svr:1414 should be accessible to app1. We tried doing a telnet to mqm_svr:1414 and got a connection timeout. |
mqm_svr:1414 and app1 are running on dockervm1 and app2 is running on dockervm5. When I telnet to mqm_svr from app2 to 1414 port, it says connection timeout. But when i try to telnet to mqm_svr from app1 which is also running on dockervm1 , it gets connected. |
Can anyone please point me to some reference or any other issue related to this. |
I have 4 services from which 3 service are running on dockervm1 and one service is running on dockervm5.Below are the information:
docker info:
docker version:
docker-compose :
After deploying the above docker-compose, 4 services are created from which one service is deployed on dockervm5 and 3 service's are deployed on dockervm1.
While pinging mqm_svr from app2 which is running on dockervm5 the ip address it picks up is 10.0.0.4. But ip address of the mqm_svr is 10.0.0.5 as shown below.
docker network inspect shows ip address of mqm_svr as 10.0.0.5:
This is the ping command executed from app2 which is running on dockervm5 which is showing ip address of mqm_svr as 10.0.0.4 same is happening with db_svr.
Also same behaviour is observed from app1 which is running on dockervm1.
bash-4.3# ping mqm_svr
PING mqm_svr (10.0.0.4): 56 data bytes
64 bytes from 10.0.0.4: seq=0 ttl=64 time=0.119 ms
64 bytes from 10.0.0.4: seq=1 ttl=64 time=0.105 ms
64 bytes from 10.0.0.4: seq=2 ttl=64 time=0.132 ms
64 bytes from 10.0.0.4: seq=3 ttl=64 time=0.120 ms
^C
--- mqm_svr ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.105/0.119/0.132 ms
Also app1 is able to connect to mqm_svr but app2 is not able to connect to mqm_svr which is running on dockervm5.
Can anyone please help?
The text was updated successfully, but these errors were encountered: