mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Srinivasa Raghavan <raghav135@gmail.com>
To: musl@lists.openwall.com
Subject: DNS resolution happenning only after timeout
Date: Thu, 28 Sep 2017 15:45:28 +0530	[thread overview]
Message-ID: <CAGpKtJ7YRMvxZ-9Nd+OEga7i4b=p1FTtaKvr8eiuWnmEBU0WyQ@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1257 bytes --]

Hi,

When using "Alpine" docker image which uses musl-libc, we are facing delay
when we do operations like below in our production environment,
1. ping <name>
2. nslookup <name>
3. traceroute <name>
4. http request from node.js

There is a 5 second delay in name resolution, and then the above command
returns the response. The same problem does not occur in "debian" docker
image (which uses GNU libc).

In our case, there is a combination of SERVFAIL, "canonical name" along
with "Non authoritative answer".

Some learnings after doing some trial and error:
1. If I install "bind-tools" package in alpine, the "nslookup" happens
without delay.
2. If I set "options timout:1" in /etc/resolv.conf , then the name is
resolved after 1 second (instead of 5 seconds).
3. Whatever I change in /etc/resolv.conf (Like setting "domain", "search"),
there was no benefit.
4. output of "host"/"nslookup" command shows "SERVFAIL"
5. The problem does not occur if run from the host machine (Not from alpine
container).
6. The problem does not occur if run from another container which uses Gnu
libc, like "Debian" image.

Sample command outputs attached for reference.

Request you to kindly help in debugging / resolution of this.

Kind Regards,
R. Srinivasa Raghavan.

[-- Attachment #1.2: Type: text/html, Size: 1713 bytes --]

[-- Attachment #2: dns.rtf --]
[-- Type: application/rtf, Size: 3864 bytes --]

             reply	other threads:[~2017-09-28 10:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 10:15 Srinivasa Raghavan [this message]
2017-09-28 10:28 ` Szabolcs Nagy
2017-09-28 16:55   ` Rich Felker
2017-10-04 13:48     ` Srinivasa Raghavan
2017-10-04 16:46       ` Markus Wichmann
2017-10-04 19:28         ` Srinivasa Raghavan
2017-10-04 20:18           ` Rich Felker
2017-10-04 20:39             ` Srinivasa Raghavan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGpKtJ7YRMvxZ-9Nd+OEga7i4b=p1FTtaKvr8eiuWnmEBU0WyQ@mail.gmail.com' \
    --to=raghav135@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).