hostname -f does not show FQDN

Bug #501130 reported by gmoore777
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

On LucidLynx (with all the current updated), while connected to my company's internal network,
when I run this:

hostname; hostname -f; hostname -s; hostname -i

I get this:

machine15
machine15
machine15
127.0.1.1

What I expect to get (as compared to being on HardyHeron) is this:
machine15.domain.com
machine15.domain.com
machine15
<actual IP address>

From a default installation of LucidLynx, I have changed /etc/hostname
from just the short name (machine15) to the long hostname (machine15.domain.com).
This is all I needed to do to make the above hostname commands provide the desired output on a HardyHeron installation.

The machines, when they boot up get assigned an IP address correctly and are registered
correctly in DNS. (meaning `nslookup machine15` returns a valid entry of:

Name: machine15.domain.com
Address: <actual ip address that also corresponds to output of `ifconfig`>

(I purposely have changed my machine name and domain name in the above write up)
---
AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access /dev/snd/: No such file or directory
AplayDevices: aplay: device_list:223: no soundcards found...
Architecture: amd64
ArecordDevices: arecord: device_list:223: no soundcards found...
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Release Candidate amd64 (20100419.1)
MachineType: Dell Inc. OptiPlex 755
Package: linux (not installed)
PciMultimedia:

ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-21-generic root=UUID=3b8a4088-fc00-4ed8-a1c1-db4d06b9b507 ro quiet splash
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Regression: Yes
Reproducible: Yes
Tags: lucid networking regression-potential needs-upstream-testing
Uname: Linux 2.6.32-21-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 12/09/2008
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A12
dmi.board.name: 0PU052
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 15
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA12:bd12/09/2008:svnDellInc.:pnOptiPlex755:pvr:rvnDellInc.:rn0PU052:rvr:cvnDellInc.:ct15:cvr:
dmi.product.name: OptiPlex 755
dmi.sys.vendor: Dell Inc.

Andy Whitcroft (apw)
tags: added: kernel-series-unknown
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi gmoore777,

This bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 501130

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
gmoore777 (guy-moore) wrote :

1.)
I just built out a brand new machine with LucidLynx Release Candidate and updated to the latest packages and rebooted.
So this is a virgin system. ( i haven't edited a thing.)

2.)
Here is the result of this set of commands:

$ hostname; hostname -f; hostname -s; hostname -i
machine69
machine69
machine69
127.0.1.1

$ sudo ifconfig -a
   eth1 Link encap:Ethernet HWaddr 00:21:70:53:d3:77
               inet addr:164.179.215.77 Bcast:164.179.215.255 Mask:255.255.255.0

From another machine in the network: $ nslookup machine69
   machine69.DOMAIN.com
   164.179.215.77

From my point of view,
I clearly have an IP address, so `hostname -i` is wrong.
I clearly am in DNS in the network with a FQDN, so `hostname -f` is wrong.
(not sure what I think what just `hostname` should output at this time.)

3.)
If I edit /etc/hostname, and change machine69 to "machine69.DOMAIN.com"
and run `sudo hostname machine69.DOMAIN.com`, I should be able to influence
both the `hostname` and `hostname -f` command.

$ hostname; hostname -f; hostname -s; hostname -i
machine69.DOMAIN.com
machine69
machine69
127.0.1.1

So at least `hostname` has been "fixed", but `hostname -f` and `hostname -i` still broken.

4.)
I will run `apport-collect -p linux 501130` after this posting.

5.)
the hostname, "machine69" and domain name "DOMAIN" has been changed from the real names in this posting.

6.)
Does anyone agree with me about what `hostname -f` and `hostname -i` should output?

7.)
And does anyone else show the same lack of output from the hostname commands?

tags: added: apport-collected
description: updated
Revision history for this message
gmoore777 (guy-moore) wrote : BootDmesg.txt

apport information

Revision history for this message
gmoore777 (guy-moore) wrote : CurrentDmesg.txt

apport information

Revision history for this message
gmoore777 (guy-moore) wrote : Lspci.txt

apport information

Revision history for this message
gmoore777 (guy-moore) wrote : Lsusb.txt

apport information

Revision history for this message
gmoore777 (guy-moore) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
gmoore777 (guy-moore) wrote : ProcInterrupts.txt

apport information

Revision history for this message
gmoore777 (guy-moore) wrote : ProcModules.txt

apport information

Revision history for this message
gmoore777 (guy-moore) wrote : UdevDb.txt

apport information

Revision history for this message
gmoore777 (guy-moore) wrote : UdevLog.txt

apport information

Revision history for this message
gmoore777 (guy-moore) wrote :

I downloaded linux-image-2.6.34-020634rc5-generic_2.6.34-020634rc5_amd64.deb
and installed it, and ran it at the Grub menu.

$ uname -a
Linux bee69.omgeollc.com 2.6.34-020634rc5-generic #020634rc5 SMP Tue Apr 20 09:07:31 UTC 2010 x86_64 GNU/Linux
$

Same problem: `hostname -f` and `hostname -i` are broken as described above.

gmoore777 (guy-moore)
tags: removed: needs-upstream-testing
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu release http://www.ubuntu.com/getubuntu/download . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.