Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-02-2008, 07:48 AM   #1
LQ Newbie
Registered: Apr 2008
Posts: 1

Rep: Reputation: 0
Hostname lookup failure

Whenever i type 'hostname -i' in the terminal , i get 'hostname lookup failure' error.Help me out with this problem....
Old 04-02-2008, 08:20 AM   #2
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
hostname -i should just show you your IP address.
Have you set the IP in ifcfg-eth0 and in your /etc/hosts file?

What do you get if you type ifconfig?
Old 06-23-2011, 10:18 AM   #3
LQ Newbie
Registered: Jun 2011
Posts: 1

Rep: Reputation: Disabled
I have encountered the same issue

here is the output from my /etc/hosts file

[root@conganode1 etc]# cat hosts
# Do not remove the following line, or various programs
# that require network functionality will fail. localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6 congaheadnote conganote1

Here is output that I type in ifconfig

[root@conganode1 etc]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:AD:48:1A
inet addr: Bcast: Mask:
inet6 addr: fe80::20c:29ff:fead:481a/64 Scope:Link
RX packets:4203 errors:0 dropped:0 overruns:0 frame:0
TX packets:3267 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4330849 (4.1 MiB) TX bytes:456168 (445.4 KiB)
Interrupt:67 Base address:0x2024

It seems there is no hostname associated with the IP in the output from my ifconfig

Please help. I used DHCP not static IP to configure my network card. And this is the test machine running on vmworkstation, and there is no DNS has been configure.

Thank you for the time and help.

Old 06-23-2011, 04:23 PM   #4
Registered: Nov 2006
Distribution: Fedora 15 x86_64
Posts: 76

Rep: Reputation: 24
Originally Posted by akayoyo View Post
here is the output from my /etc/hosts file
[root@conganode1 etc]# cat hosts
# Do not remove the following line, or various programs
# that require network functionality will fail. localhost.localdomain localhost conganode1
... snip ...
If you are logged in to "conganode1" and want that to resolve to localhost (, add "conganode1" to the end of the entry. I would also remove the other conganode1 entry, as it will confuse your system and cause network traffic that should go through the loopback device to be routed strangely ...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Telnet : Temporary failure in name resolution : Host name lookup failure koodoo Linux - Newbie 10 02-11-2008 08:59 PM
unable to lookup my hostname via gethostbyname() function fakie_flip Linux - Software 4 09-03-2006 04:52 AM
Apache log hostname lookup program ? Carlee Linux - Software 1 01-29-2005 06:40 PM
Odd hostname lookup problem max_sipos Linux - Networking 3 11-15-2004 12:29 PM
startkde eroor - hostname: Host name lookup failure slavix Debian 6 08-10-2004 05:56 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration