Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!ANDREW.CMU.EDU!gk5g+ From: gk5g+@ANDREW.CMU.EDU (Gary Keim) Newsgroups: comp.soft-sys.andrew Subject: Re: problem with console, help (PL6) Message-ID: Date: 30 Aug 90 21:56:09 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 72 Excerpts from misc: 30-Aug-90 Re: problem with console, h.. Jonathan Levine@uunet.uu (1588) > >Help does a similar thing. After I type 'help' it sits for a few minutes > >and then prints out: > > > > "No 'localhost' found in host table; creating new window." > > > >However, localhost is in my /etc/hosts as: > >127.1 localhost loopback loghost I built Andrew (patch6) on a Sun4_40 machine here at CMU. I had RESOLVER_ENV defined and RESOLVLIB set to /usr/lib/libresolv.a. The machine had an /etc/hosts that was extensive and included an entry for a remote named(8) server. I was experiencing the problems described previously. The machine did NOT have an /etc/resolv.conf file. I put one on the machine and everything was golden. That file maps named(8) servers to internet dot-notation. (fallscreek)gk5g> cat /etc/resolv.conf nameserver 128.2.35.50 nameserver 128.2.84.1 nameserver 128.2.13.21 I don't know if this file is absolutely necessary in the default case. Documentation for resolver(5) says: DESCRIPTION The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by a process. The file is designed to be human readable and contains a list of name-value pairs that provide various types of resolver information. On a normally configured system this file should not be necessary. The only name server to be queried will be on the local machine and the domain name is retrieved from the system. Anyone have additional knowledge on this subject? The failure that has been reported is with gethostbyname(3n): Gethostbyname and gethostbyaddr each return a pointer to an object with the following structure. This structure contains either the information obtained from the name server, named(8), or broken-out fields from a line in /etc/hosts. If the local name server is not running these routines do a lookup in /etc/hosts. My (admittedly limited) understanding: First the resolver (via gethostbyname(3n)) tries a remote name server, then one running on the local machine if it exists, and finally it'll look in /etc/hosts. If you have a name server on your local machine you don't need /etc/resolv.conf. If you have a remote name server you need /etc/resolv.conf. And finally, if you aren't using the resolver you only need /etc/hosts. It would seem to me that the resolver should consult /etc/hosts if it can't access the name server. It doesn't seem to be doing that. Will those of you who are experiencing this problem please mail me the answers to these questions: 1) machine and configuration. 2) RESOLVER_ENV defined? 3) RESOLVLIB defined or using libc? 4) Running a local name server? 5) Using a remote name server? Thanks, Gary Keim ATK Group