-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
curl
doesn't accept DNS responses on alpine:3.19
#12558
Labels
Comments
curl
doesn't accept DNS responses on alpine:3.19
The alpine:3.19 curl is showing that it's using the c-ares resolver, while the
alpine:3.18 version is using the system resolver. That's likely to be the
reason for the change in behaviour. Is there any relevant option in
/etc/resolv.conf (e.g. ndots) that could affect this?
|
@dfandrich I tried different values for cat /etc/resolv.conf
#search ns-dns.svc.cluster.local svc.cluster.local cluster.local
#nameserver 10.96.0.10
#options ndots:5
#
options ndots:5
nameserver 127.0.0.1 |
This sounds like a (potential) c-ares issue. |
If this problem remains with the latest c-ares version, I propose you file an issue in the @c-ares project. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did this
Hello! I downloaded
curl
onalpine:3.19
withapk add curl fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz (1/8) Installing ca-certificates (20230506-r0) (2/8) Installing brotli-libs (1.1.0-r1) (3/8) Installing c-ares (1.22.1-r0) (4/8) Installing libunistring (1.1-r2) (5/8) Installing libidn2 (2.3.4-r4) (6/8) Installing nghttp2-libs (1.58.0-r0) (7/8) Installing libcurl (8.5.0-r0) (8/8) Installing curl (8.5.0-r0) Executing busybox-1.36.1-r15.trigger Executing ca-certificates-20230506-r0.trigger OK: 12 MiB in 23 packages
A pod with
apline
is deployed in a Kubernetes cluster. I send a request togreeting.default
service on the cluster and get this error:The problem is that if I do the request on
apline:3.18
I get a correct response from the service.curl greeting.default:9080 "hello world from istio"
I install
curl
onalpine:3.18
the same way:apk add curl fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz curl greetinfetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz g.default(1/7) Installing ca-certificates (20230506-r0) (2/7) Installing brotli-libs (1.0.9-r14) (3/7) Installing libunistring (1.1-r1) (4/7) Installing libidn2 (2.3.4-r1) (5/7) Installing nghttp2-libs (1.57.0-r0) (6/7) Installing libcurl (8.5.0-r0) (7/7) Installing curl (8.5.0-r0) Executing busybox-1.36.0-r9.trigger Executing ca-certificates-20230506-r0.trigger OK: 12 MiB in 22 packages
We use our own DNS server on the pod with
alpine
and it usessearch domains
automatically. For example, if I do DNS lookup forgreeting.service
I can getgreeting.default.svc.cluster.local
:It looks like
alpine:3.19's curl
doesn't accept such DNS responses. I tried to manually change the DNS response fromgreeting.default.svc.cluster.local
togreeting.default
inANSWER SECTION
andcurl (alpine:3.19)
accepted that.I tried
ping
and it accepted thegreeting.default.svc.cluster.local
response from the DNS server.curl (alpine:3.18)
is also ok with this response.curl (alpine:3.19)
doesn't accept this DNS response. Is it a bug? Or this behaviour has been changed intentionally?I expected the following
The
curl
results onalpine:3.18
andalpine:3.19
are the same.curl/libcurl version
alpine:3.18
alpine:3.19
operating system
alpine:3.18
apline:3.19
The text was updated successfully, but these errors were encountered: