newby questions

Matthias Lang <>
Sun Nov 28 22:05:47 CET 2004


Pat29 writes:

 > Sorry for these questions but i had been learning Erlang (2 weeks) 
 > with the french book and i got the following error after launched 
 > this command on WinXP SP2

 > D:\Pat29\erlang\Erlang Book\ch8\ex1\src>erl -sname database -pa ebin
 > 
 > {error_logger,{{2004,11,28},{14,47,58}},'Protocol: ~p: register/listen 
 > error: ~p ~n',[inet_tcp,enotsock]}

[...]

 > {{badmatch,{error,enotsock}},[{gstk_port_handler,init,2}]}

It's saying that it tried to open a TCP socket and the operating
system replied 'no way, José'. If this was happening on a unix
machine, I'd say "have you compiled a kernel without sockets or
without IP networking?", but since it's windows I'm clueless.

I'm guessing that if you start non-distributed Erlang (i.e. just run
'erl') and then do this:

   1> gen_tcp:listen(0, []).
   {ok,#Port<0.82>}

your setup will reply {error, enotsock} instead of {ok, Port}. Right?

Can you do anything else with TCP on that machine, for instance does
'telnet' work? 

Maybe someone who actually uses windows can give you some more
specific tips. (Is it possible to remove/disable/break TCP and/or
sockets on a windows machine?)

Matthias



More information about the erlang-questions mailing list