host.conf problem

Rick Stevens rstevens at vitalstream.com
Fri Sep 2 18:39:21 UTC 2005


Fred Grant wrote:
> On Thu, 2005-09-01 at 11:21, Rick Stevens wrote:
> 
>>Fred Grant wrote:
>>
>>>On Tue, 2005-08-30 at 20:23, Rick Stevens wrote:
>>>
>>>
>>>>Bob McClure Jr wrote:
>>>>
>>>>
>>>>>On Tue, Aug 30, 2005 at 06:24:55PM -0500, Fred Grant wrote:
>>>>>
>>>>>
>>>>>
>>>>>>On Mon, 2005-08-29 at 18:18, Bob McClure Jr wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>On Mon, Aug 29, 2005 at 06:06:20PM -0500, Fred Grant wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>On log-in, I periodically and sporadically get a message that the system
>>>>>>>>can't determine the host for Internet use.  When I check the host.conf
>>>>>>>>folder it is missing the "localhost.localdomain" info.
>>>>>>>
>>>>>>>That does not compute.  /etc/host.conf (a file, not a folder) normally
>>>>>>>contains
>>>>>>>
>>>>>>>order hosts,bind
>>>>>>>
>>>>>>>and that's all.  Perhaps you're thinking of /etc/hosts, which should
>>>>>>>have something like (mine as an example):
>>>>>>>
>>>>>>>127.0.0.1       localhost.localdomain   localhost
>>>>>>>192.168.2.2     bobcat.bobcatos.com     bobcat
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>I can fix it by (as root) copying hosts.bak to this folder but it is
>>>>>>>>kind of a pain.
>>>>>>>>
>>>>>>>>Any ideas as to why this periodically drops out?  I'm using FC2.
>>>>>>>>
>>>>>>>>Thanks
>>>>>>>
>>>>>>>Cheers,
>>>>>>
>>>>>>You are right Bob, it's /etc/hosts that loses the localhost.localdomain
>>>>>>info.  I wonder if I could incorporate  copying of this info into the
>>>>>>daily cron job?  Seems funny that the info periodically gets lost.
>>>>>
>>>>>
>>>>>No, that's a band-aid.  Something else is wrong that needs to be fixed.
>>>>>
>>>>>Look in /etc/sysconfig/networking/profiles/default/hosts and see what
>>>>>it looks like.  It it's improper, fix it and see if the problem
>>>>>doesn't go away.
>>>>>
>>>>>No, I don't know how that gets into the game.  Rick probably does.
>>>>
>>>>Er, it could be the DHCP client requesting it from the DHCP server and
>>>>gronking it.  I'd have to look.
>>>
>>>
>>>>Is that something the ISP does?
>>
>>Well, whoever your DHCP service is.  If you use a cable or DSL modem
>>via ethernet, it'd be the modem.  If you have a router betwixt the
>>modem and your machine, it'd probably be the router.  If you use a
>>direct modem via the PCI bus or serial port, it'd be your ISP.
>>
>>As Bob said, check /etc/sysconfig/networking/profiles/default/hosts
>>and verify that it's correct.  You can then also check
>>/etc/dhclient-script to see if it's stomping on it.
>>----------------------------------------------------------------------
> 
> 
> Here is the content of /etc/sysconfig/...
> 
>>127.0.0.1	localhost
> 
> Does it seem OK to you?

No.  It should read (at a minimum):

	127.0.0.1	localhost	localhost.localdomain

At a maximum, it should contain all of the IPs and host names that you
want hard coded and not reliant on DNS.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-     Better to understand a little than to misunderstand a lot.     -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list