Re: /lib/systemd/systemd-hostnamed hang
On 11/26/12, Zenaan Harkness <email@example.com> wrote:
> Only in the hindsight of my questions to this list, am I now able to
> connect these dots clearly and recognize that my
> /etc/network/interfaces was missing any entry for _mynewhostname_.
> The X session manager has a hostname lookup delay (it seems to me)
> when starting an xterm, but only when running systemd (presumably with
> hostnamed), and hostnamed seems to say it wants libnss-something.
Correction, the xterm struggled to connect to the x session manager it
seems, after I changed my hostname from localhost.
The hostname man page says this:
You can't change the FQDN (as returned by hostname --fqdn) or the DNS
domain name (as returned by dnsdomainname) with this command. The FQDN
of the system is the name that the resolver(3) returns for the host
Technically: The FQDN is the name getaddrinfo(3) returns for the host
name returned by gethostname(2). The DNS domain name is the part after
the first dot.
Therefore it depends on the configuration (usually in /etc/host.conf)
how you can change it. Usually (if the hosts file is parsed before DNS
or NIS) you can change it in /etc/hosts.
If a machine has multiple network interfaces/addresses or is used in a
mobile environment, then it may either have multiple FQDNs/domain names
or none at all. Therefore avoid using hostname --fqdn, hostname
--domain and dnsdomainname. hostname --ip-address is subject to the
same limitations so it should be avoided as well.
I still say that it would have been mighty useful for me, when I read
the hostname man page (not just that bit), to read a sentence there
somewhere such as:
"When updating the hostname, consider adding an entry in /etc/hosts."
Such things can be almost painfully obvious both in hindsight, and for
someone like me who "should have thought of it".
But if such a sentence is not inappropriate, then I say it would be
useful for newbies as well as for "shouldn't still be newbies" like
That sentence would have prompted me to go "ahah! of course! how slow
of me!" and none of this particular discussion would have been brought
by me to this list, since the hostname documentation would have given
me just enough of a kick up the pants.
And that's what it should do.