Can't resolve localhost on Mac OS X Server
Posted
by
iainbeeston
on Super User
See other posts from Super User
or by iainbeeston
Published on 2010-05-19T02:03:56Z
Indexed on
2012/10/13
3:40 UTC
Read the original article
Hit count: 650
I have a server running OS X Server 10.5 and it can't resolve localhost to 127.0.0.1.
When I try ping this is what happens:
> ping localhost ping: cannot resolve localhost: Unknown host
SSH and web browsers get similar results (uknown host). If I try using 127.0.0.1 or the ip address assigned on the LAN all of the above work.
Here's the contents of my /etc/hosts file:
> cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost
I have no local DNS service running.
Does anyone have any idea why this might be happening or how I can fix it?
© Super User or respective owner