LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 04-02-2008, 06:48 AM   #1
chandrait2004
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, 07:20 AM   #2
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542

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, 09:18 AM   #3
akayoyo
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.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.146.131 congaheadnote
192.168.146.132 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:192.168.146.132 Bcast:192.168.146.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fead:481a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
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.

Best,
 
Old 06-23-2011, 03:23 PM   #4
sandwormusmc
Member
 
Registered: Nov 2006
Distribution: Fedora 15 x86_64
Posts: 75

Rep: Reputation: 24
Quote:
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.
127.0.0.1 localhost.localdomain localhost conganode1
... snip ...
If you are logged in to "conganode1" and want that to resolve to localhost (127.0.0.1), add "conganode1" to the end of the 127.0.0.1 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 ...
 
  


Reply


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 07:59 PM
unable to lookup my hostname via gethostbyname() function fakie_flip Linux - Software 4 09-03-2006 03:52 AM
Apache log hostname lookup program ? Carlee Linux - Software 1 01-29-2005 05:40 PM
Odd hostname lookup problem max_sipos Linux - Networking 3 11-15-2004 11:29 AM
startkde eroor - hostname: Host name lookup failure slavix Debian 6 08-10-2004 04:56 PM


All times are GMT -5. The time now is 05:01 PM.

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