docker service loadbalancing failed

53 views Asked by At

I have a 2 docker services, service_1 and service_2. Each with one container. Both of them have overlay network so I can use the swarm DNS resolving, service_1 is accessing service_2 using the service name as DNS name.

However, after 20+ hours of communication, service_1 trying to access service_2:

wget service_2

But it gets an error:

wget: can't connect to remote host (10.0.0.21): Address not available

The real service_2 container IP is 10.0.0.22. The service VirtualIP is 10.0.0.21.

The network inspect shows the range "IPv4Address": "10.0.0.22/24" for service_2.

If I run from service_1 the following command (using the real service_2 container IP):

wget 10.0.0.22

I got the right response.

So to conclude it's seems some problem with VirtualIP loadbalancing. Did anyone encounter this problem too?

0

There are 0 answers