Bug 76543

Summary: name to IP resolution issues
Product: [Retired] Red Hat Linux Reporter: Need Real Name <emailaccount>
Component: glibcAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: high    
Version: 8.0CC: brandon.applegate, redhat, redhat-mail, robert.youngjohns, stephen.walton, tim, trm
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-24 01:31:41 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Need Real Name 2002-10-22 23:45:46 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
Resolver.  General problem with name to IP resolution.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
See Additional information section for configuration information

Actual Results:  See Additional information section for configuration information

Expected Results:  names should be resolved to IP via files when files specified
first.  BIND should resolve locally first when local host names are used.

Additional info:

There appears to be a general issue with name to IP resolution in RedHat Linux
8.0.  This is present in a number of different situations.

Senerio 1.  Initially I was working with a simple files based network setup. 
That is my system names were listed in /etc/hosts both as fqd names (dot 3) and
short (just server name) name alias.  Both /etc/host.conf and /etc/nsswitch.conf
were set for files first and then dns.  My IP's nameservers where set in
/etc/resolv.conf.  The first thing I noticed is that when trying to connect to
systems on my local network with this setup ssh and telnet attempt to resolve
via DNS first.  Only after the attempt times out or otherwise fails will it fall
back to files.  This is true both with short and fqd system names.  Oddly enough
ping is not effected.  With ping the hostnames appeared to immediately resolve
directly from /etc/hosts without an internet DNS lookup attempt.  I am throughly
convinced the behavior under this senerio is a bug.

Senerio 2.  Decided to setup a DNS (BIND) server for my local network.  Slightly
different resolution pattern observed.   All fqd (dot 3) local network system
names resolved without issue for ssh, telent, and ping.  However, short names
did not appear to resolve properly.  Encountered delays before they would
resolve via local DNS (I had commented out entries in /etc/hosts and had
internet DNS disabled to ensure I was resolving only through my DNS).  At first
I thought this was a setup problem with my DNS server but I found that when I
tried ping the system names resolved immediately without delay even with just
short (host) names.  It seems almost as if the domain name is not being
appropriately taken into account when using ssh and telnet during the hostname
resolution.  I tried entering the domain into /etc/resolve.conf but there was no
change.  Either way ssh and telnet attempted to contact outside DNS servers
(this could be evidenced in firewall logs after setting the fw to drop outbound
DNS at the gateway) before using the local zone information, however, ping
immediately resolved using the local zone information without attempting to
contact internet servers.

Sernerio 3.  The final thing to report is that I have just observed that mail
(sent from anacron to root on the local system in this case) appears to be
subject to external DNS resolution attempts when using the files based network
setup described in senerio 1.
Comment 1 Need Real Name 2002-10-22 23:48:02 EDT
Not component is not properly classified but I could not determine proper
library.  Please reclassify.
Comment 2 brandon 2003-01-01 16:05:03 EST
This bug also appears as bug 77538  

RedHat: (can we get || is there) a master bug for this issue ?
Comment 3 Landon Curt Noll 2003-01-01 19:20:59 EST
I can confirm this bug.  In fact this bug has become a show 
stopper for our RH7.3 to RH8.0 upgrades.  This problem does 
not show up in RH7.3, FYI. 
Please consider changing the Priority of this bug from normal 
to high. 
Comment 4 Landon Curt Noll 2003-01-01 19:38:14 EST
FYI: I think this bug is better worded and addresses the    
more general problem than bug 77538.   
This general bug is related to /etc/nsswitch.conf.  The command:   
	rpm -q -f /etc/nsswitch.conf   
shows that /etc/nsswitch.conf is part of the glibc component.   
And the client/user-side name resolver is found in libc/glibc.   
In addition to changing the Priority to high, I recommend that  
the Component be changed to 'glibc'.  I believe that normally 
the Bug author (emailaccount@tds.net) is able to make these 
changes.  So emailaccount@tds.net, please make those changes 
in the 'Edit Bug Information' section and click submit below. 
Comment 5 Tim Mitchell 2003-01-01 19:45:59 EST
NIS/ypbind is suspected to not work correctly as a client in RH 8.0. I have
received reports from co-workers and will provide additional information during
week of  6-January-2003. Having read Bug# 77539, and this bug I believe there is
a serious defect in a name resolution library.
Comment 6 Tim Mitchell 2003-01-01 19:47:31 EST
correction to my previous comment: it should have referened but# 77538
Comment 7 Need Real Name 2003-01-01 20:49:49 EST
Updating component and severity information.
Comment 8 Tim Wunder 2003-01-17 14:18:56 EST
I think bug 77538#c9 and bug 77538#c10 may help in diagnosing the problem.
Comment 9 Landon Curt Noll 2003-01-31 18:01:18 EST
There is an ugly hack-a-round for this bug: 
Duplicating each ip-host entry in /etc/hosts with an 2nd 
trailing dot entry allows one to hack-a-round this problem. 
This is a gross hack.  This glibc bug really does need to 
be fixed.  But while we wait for this bug to be fixed, 
you can try this hack. 
Comment 10 Landon Curt Noll 2003-02-12 02:56:51 EST
See also bug 84105: 
	excessive IPv6 lookups done even when /etc/hosts resolves to IPv4 
Comment 11 Landon Curt Noll 2003-02-22 10:23:26 EST
I appears that this name to IP resolution problem has been resolved in
rawhide. See:


for details.
Comment 12 Landon Curt Noll 2003-02-25 14:27:57 EST
A clarification on: 
You should NOT install those RPMs on a production system.  Rawhide 
is raw bits.  Those RPMs were only in relationship to various DNS 
issues.  Those rpms have a number of non-DNS related problems. 
For example, they cause the rpm command to dump core.  They did, 
however,  resolve the DNS issues, with the possible exception of 
excessive IPv6 lookups. 
Comment 13 Ulrich Drepper 2003-04-24 01:31:41 EDT
There are a few misconceptions in the original report.  The order specification
in /etc/host.conf is pointless nowadays, this is what we have NSS for. The file
is read but order is not used.

Regarding the stall and DNS lookups, no recent release should have any problems
with this.
Comment 14 Steve Dickson 2004-06-15 20:38:40 EDT
*** Bug 81737 has been marked as a duplicate of this bug. ***