unknown host

Sion Arrowsmith siona at chiark.greenend.org.uk
Fri Jun 1 10:14:11 EDT 2007


abcd  <codecraig at gmail.com> wrote:
>I have a linux machine (ip = 10.10.10.8), which can ping other
>machines on the same subnet...such as
> [ ... ]
>If I use socket.gethostbyaddr(<ip>) I get back results when ip is
>10.10.10.1 and 10.10.10.254 but for the other IP addresses
>(10.10.10.5, .6, etc) I get back "unknown host".  In fact I get
>"unknown host" for the linux machine that I run the gethostbyaddr
>from.
>
>If perform the same operation from a windows machine (ip = 10.10.10.5)
>it returns data for the other IP addresses as expected.
>
>any ideas?

Almost certainly it's a name resolution configuration problem --
check that on the Linux machine 'host 10.10.10.x' gives the same
results as Python, then go and look at what you've got in
/etc/hosts and /etc/resolv.conf .

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
   "Frankly I have no feelings towards penguins one way or the other"
        -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list