Thank you, thank you, thank you! Very thorough and answers my questions. I
kind of figured that dynamically configuring my FQDN would be the right
answer and your scripts would certainly do the job...
-Alex
Wirth's Law: Software gets slower faster than Hardware gets faster!
"On the side of the software box, in the 'System Requirements' section, it
said 'Requires Windows 95 or better'. So I installed Linux." - Anonymous
On Tue, 18 Jul 2000, Benjamin Scott wrote:
> On Tue, 18 Jul 2000, Alex Hewitt USG wrote:
> > However, when I tried to setup my Linux system, the system hung when it
> > tried to start sendmail and then hung again when it got to the Apache
> > httpd daemon.
>
> As others have pointed out, the problem is your machine's host name isn't
> resolving to a domain name.
>
> Various programs (like sendmail) need to know your fully qualified domain
> name (FQDN) in order to function properly. They determine your FQDN by
> feeding the hostname to the name resolver and seeing what comes back. The
> resolver will get your hostname (say "foo") and try and find a match for "foo"
> in the DNS domains it knows about. This can take awhile, especially if DNS is
> out because the network isn't up yet. :-)
>
> A quicky-and-dirty fix is to put your unqualified hostname in your
> /etc/hosts file as an alias for the localhost address (127.0.0.1). Some
> people also invent a bogus FQDN for localhost ("localhost.localdomain", for
> example). For example, if your hostname is "foo":
>
> 127.0.0.1 localhost.localdomain localhost foo
>
> You can also run into problems if a program tries to find the domain names
> of all the network interfaces addresses in your system. A program will find
> 127.0.0.1 on the "lo" interface, but that will resolve nicely since it is in
> the /etc/hosts file. But 192.168.1.101 on eth0 (or whatever) likely won't be.
> A solution to that follows below.
>
> > I waited for the services to timeout and once I was able to login, I tried
> > to start X which hung trying to get the host's IP address.
>
> This is probably X trying to connect to the font server, although that's
> just a guess.
>
> > I was temporarily able to correct all of this by editing my /etc/hosts
> > file and adding the system's hostname and the IP address that the DHCP
> > server had given it (specifically 192.168.1.101). Somehow this doesn't
> > quite seem correct.
>
> Actually, it would be perfect, except for the fact that DHCP addresses can,
> of course, change. I suppose you could just edit the file every time that
> happened, but ...
>
> You say you're using a Red Hat system. Red Hat uses two scripts, /sbin/ifup
> and /sbin/ifdown, to configure network interfaces. They have a useful feature
> where they invoke ifup-local and ifdown-local after they are done (if they
> exist).
>
> I solved the problem you're having by creating those scripts, and having
> them add/remove the hostname to the /etc/hosts file with the dynamic address.
> The scripts are attached to this message.
>
> Usage:
>
> If the network interface is "eth0" you can pretty much just plug-and-play.
> If not, you need to add a line with "PRIMARY_INTERFACE=whatever" to your
> /etc/sysconfig/network file to tell these scripts which interface is
> associated with your hostname.
>
> Hope this helps!
>
> --
> Ben Scott <[EMAIL PROTECTED]>
> | "Knowledge is always of value, and the value is never predictable. What |
> | will come of it, we cannot know." -- Larry Niven |
>
**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************