Unable to resolve host by name

NoOp glgxg at sbcglobal.net
Wed Nov 26 15:20:00 UTC 2008


On 11/25/2008 10:23 PM, Nils Kassube wrote:
> Bob Cortez wrote:
>> media at media:~$ hostname
>> media
>>
>> I can ping localhost from media
>>
>> media at media:~$ cat /etc/hosts
>> 127.0.0.1    localhost media
>> 127.0.1.1    media
>> 192.168.0.109   media
> 
> Maybe I'm wrong because it is a bit difficult to follow this thread, but 
> it seems to me that your entry for 192.168.0.109 is in the wrong hosts 
> file. For the media machine the file should be like this:
> 
> 127.0.0.1    localhost
> 127.0.1.1    media.local media
> 
> And on your machine mystic-laptop the file should look like this:
> 
> 127.0.0.1      localhost
> 127.0.1.1      mystic-laptop.local mystic-laptop
> 192.168.0.109  media.local media
> 
> Of course there could be other entries for static IPs if you want but 
> these are the ones you need if your "Remote Desktop Viewer" wants to 
> find "media.local::5900".
> 
> 
> Nils
> 

How did I miss that? You are correct and I gave see where I caused the
problem by telling him:

> 127.0.0.1  localhost media
> 127.0.1.1  media
> 
> 192.168.0.109 media

When that should have been:

On mystic-laptop:

127.0.0.1  localhost mystic-laptop
127.0.1.1  mystic-laptop

192.168.0.109 media

and on media:

127.0.0.1  localhost media
127.0.1.1  media

192.168.0.<IP> mystic-laptop

As for the <name>.local I found that intrepid's Network Manager seems to
like to add '.local' to things (even pings) regardless of what is in the
hosts file. I've not checked as I have NM uninstalled on my intrepid
machine, but my guess would be that if you added '.local' to the hosts
file you'd end up with <name>.local.local in some applications/actions.





More information about the ubuntu-users mailing list