From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11955 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: DNS resolution happenning only after timeout Date: Thu, 28 Sep 2017 12:28:55 +0200 Message-ID: <20170928102854.GI15263@port70.net> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1506594548 19977 195.159.176.226 (28 Sep 2017 10:29:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 28 Sep 2017 10:29:08 +0000 (UTC) User-Agent: Mutt/1.6.0 (2016-04-01) Cc: Srinivasa Raghavan To: musl@lists.openwall.com Original-X-From: musl-return-11968-gllmg-musl=m.gmane.org@lists.openwall.com Thu Sep 28 12:29:04 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dxW3y-0004i6-Ap for gllmg-musl@m.gmane.org; Thu, 28 Sep 2017 12:29:02 +0200 Original-Received: (qmail 11728 invoked by uid 550); 28 Sep 2017 10:29:07 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 11710 invoked from network); 28 Sep 2017 10:29:06 -0000 Mail-Followup-To: musl@lists.openwall.com, Srinivasa Raghavan Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:11955 Archived-At: * Srinivasa Raghavan [2017-09-28 15:45:28 +0530]: > 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 > 2. nslookup > 3. traceroute > 4. http request from node.js > this bug may be related: https://github.com/rancher/rancher/issues/9961 > 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.