-
Notifications
You must be signed in to change notification settings - Fork 0
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
Container Network DNS Resolution Error #54
Comments
Most likely the issue is due to curl now using c-ares in Alpine 3.19 instead of the system DNS resolver as was used in Alpine 3.18 and there is an issue in c-ares where it does not support ndots: 0. This is fixed in c-ares v1.31.0. However, that fix was just 3 weeks ago and hasn't made it into the upstream eclipse-termurin:11-alpine image. Unfortunately, there doesn't appear to be a tag for eclipse-termurin for Java 11 and Alpine 3.18 specifically so it isn't so simple to roll back. Note: This appears to be a curl specific issue as it uses c-ares. The ping command for example works fine and apparently continues to use the system DNS resolver even in Alpine 3.19. Note: To rollback to a specific previous version of an image we must use a digest as the tags provided by maintainers are constantly updated and insufficient in this case. Unfortunately searching the history to find the digest to rollback and pin is a hole in the Docker environment at the moment: docker/roadmap#185 |
Musings:
|
Poking around in Docker Desktop I got lucky and noticed the base tag used for jeffersonlab/registrations2epics:4.5.0 actually corresponded to several tags, which Docker Desktop enumerated and one happened to have been more specific and not changed: |
With the latest version of JAWS (v4.13.0) a container in the test environment can no longer correctly resolve another container IP in the same network by name. Continues to work fine in production with older version (v4.12.0). Rolling test environment back to previous version fixes the issue.
Specifically, the issue is that the
registrations2epics
container cannot use curl to test readiness of the container namedregistry
as curl finds a host on the Internet instead. Other containers in the test network can resolve the localregistry
host IP fine. A Compose down/up cycle does not resolve. Host reboot does not resolve. No obviously problematic changes were made to the registrations2epics container, though it was re-built so vague Dockerfile tag may result in updated base image.The badly behaving curl command looks like:
vs good curl command outcome:
Note: You can also "fix" the problem by using the fully qualified name
registry.jaws_default
.Note: We rely on the default network that docker compose creates (which is not to be confused with the default bridge network that docker run uses). The default compose network is actually a custom network, but created automatically on
compose up
, but is also of type bridge. The private IP address space chosen appears to change randomly on each up/down cycle. The configuration looks like:The curl version is different in the different JAWS versions, and linked libraries also differ (so base image did change):
JAWS v4.13.0 (registrations2epics v4.6.0)
vs JAWS v4.12.0 (registrations2epics v4.5.0)
The /etc/resolv.conf is identical in both versions:
Possibly related:
search .
inresolv.conf
with 1.25.0 k3s-io/k3s#6132curl
doesn't accept DNS responses onalpine:3.19
curl/curl#12558The text was updated successfully, but these errors were encountered: