Debian upgrade gone wrong - hostname: Name or service not known

William O'Higgins Witteman william.ohiggins-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Wed Nov 4 20:07:58 UTC 2009


On Wed, Nov 04, 2009 at 02:57:58PM -0500, William O'Higgins Witteman wrote:
>On Tue, Nov 03, 2009 at 04:24:06PM -0500, Madison Kelly wrote:
>>William O'Higgins Witteman wrote:
>>>I have encountered one of the rare occasions where a Debian upgrade goes
>>>wrong:
>
>>Check that '/etc/hostname' contains just the name of your system
>>followed by a new line and nothing else. Then try running 'hostname
>><machinename>' and hit enter. Then try again.
>
>Interestingly, though I got around this problem by stomping on netatalk,
>it is still broken and causing problems with amavis.
>
>Symptom: 
>
># hostname 
>  returns the subdomain (this machine is a subdomain - this is as expected)
>
># hostname --fqdn [-f]
>  returns hostname: Name or service not known
>
>/etc/hosts looks fine, as does /etc/hostname
>
>This stopped working because of a dist-upgrade, no changes to any
>configurations.
>
>How does "hostname" work?  Why could it be barfing?  Thanks again.

Amusing sidebar - Python is not having any trouble figuring out my
hostname:

>>> import socket
>>> socket.gethostname()
'theta.utoronto.ca'
>>> socket.getfqdn()
'theta.utoronto.ca.utoronto.ca'

As a side question, why is the 2nd level and top level domain repeated?

Thanks.
-- 

yours,

William

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://gtalug.org/pipermail/legacy/attachments/20091104/1fe034c3/attachment.sig>


More information about the Legacy mailing list