inet:getaddr different results in two different erlang nodes (same machine)

Enrique Marcote <>
Mon Jun 29 14:02:25 CEST 2009


Hi,

I have two erlang nodes running simultaneously on the same machine  
(windows 2003 server).

In one of them I get:

()49> gen_tcp:connect({192,168,2,32}, 2200,  
[inet], 3000).
{ok,#Port<0.1796813>}
()50> gen_tcp:connect("192.168.2.32", 2200,  
[inet], 3000).
{error,timeout}
()51> inet:getaddr("192.168.2.32", inet).
{error,timeout}


Whilst in the other one:

()13>  gen_tcp:connect("192.168.2.32", 2200, [inet],  
3000).
{ok,#Port<0.107>}
()14> inet:getaddr("192.168.2.32", inet).
{ok,{192,168,2,32}}


(getaddr works fine for other IPs in both nodes).

()52> inet:getaddr("192.168.2.31", inet).
{ok,{192,168,2,31}}

()15> inet:getaddr("192.168.2.31", inet).
{ok,{192,168,2,31}}

I'm curious to know the reason behind this.  Thanks in advance.

Kind regards,

Enrique



More information about the erlang-questions mailing list