[erlang-questions] {error,timeout} with gethostbyname

info info@REDACTED
Thu Sep 24 16:55:57 CEST 2009


I also tried to add the address of my dns server.
inet_db:add_ns({ip}).
But no effect.

inet_getrc(). gives now:

[{host,{127,0,0,1},["my_host"]},
 {nameserver,{192,168,1,33}}]




n Wed, Sep 23, 2009 at 04:31:35PM +0200, info wrote:
> Hi all,
> On a windows 2003 server sbs this command returns {ok,"my_host"} :
> 
> {ok,N}=inet:gethostname().
> 
> But the following command returns {error,timeout} :
> 
> inet:gethostbyname(N).
> 
> On a Vista machine, the previous command returns a correct answer.
> 
> I know that it is not an erlang problem but if you could give me support, I will appreciate ;-)

Erlang may have problems configuring name lookups.
Give me the output from ets:tab2list(inet_db).

Which erlang release are you running, it sounds like pre-R13B02?

Try starting with erl -name foo
and do the same, ets:tab2list/1 too.

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB


More information about the erlang-questions mailing list