-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Docker Swarm dnsrr mode dns resolve error #41744
Comments
can you try In the linked issue, the A record is always off by minus 1. ie, the actual container IP 10.0.4.8 is listed as 10.0.4.7 in the DNS record. Is the DNS record constantly changing for you? |
It may be that when the number of docker swarm service instances was 3, three dns records were recorded, and when I changed the number of instances to 2, the dns records were not deleted, and this IP was occupied by other services, resulting in dns parsing errors.
update: |
@Livenux I discovered that the IP address of the service itself will be one minus the container IP. You can see the service vitrual IP by using docket network inspect -v . The -v is required for verbose mode to see the service VIP. Does the DNS record from dig match up with the service IP? |
is not a service VIP. is a dns cache(The ipvs mode should be a dns record, and dnsrr should be the number of instances of service, right?). I remove the dnsrr service, recreate new same name ipvs mode service, The wrong IP is still be resolved to the newly created service。 |
Hello, I have a similar issue with docker 24.0.6 (this is not the latest, but haven't found anything related to this in recent changelogs). I have many services (backend) with DNS RR resolution mode. We have connection issues from others services (reverse proxy) to some of these (backend): delay added because of timeout trying to connect to some containers IP before falling back to another IP. While debugging ( getent ahosts a-problematic-backend-service
172.31.158.180 STREAM a-problematic-backend-service
172.31.158.180 DGRAM
172.31.158.180 RAW
172.31.156.25 STREAM
172.31.156.25 DGRAM
172.31.156.25 RAW
172.31.159.84 STREAM
172.31.159.84 DGRAM
172.31.159.84 RAW While backend services without issue would only return 2 IP addresses. To resolve the issue, I tried (without success):
Is there a way to force docker internal DNS resolver to do a re-synchronization or other workaround to make it forget the wrong IP addresses (without deleting/recreating the services)? |
I have a similar issue with docker 26.1.4. |
On a 4-node docker swarm cluster, a two-instance service was released using dnsrr mode. I found that one of the dns resolutions was wrong. When using multiple pings, the dns resolved to a container of another service.
Steps to reproduce the issue:
Describe the results you received:
ping example-service
64 bytes from example-service.1.xxxxx
....
ping example-service
64 bytes from another-service.2.xxxx
Describe the results you expected:
ping example-service
64 bytes from example-service.1.xxxxx
....
ping example-service
64 bytes from example-service.2.xxxx
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: