[erlang-questions] [Windows] I can't create named node

Lee Samuel <>
Thu Feb 17 09:47:12 CET 2011


Hi,
 
Thanks for replying. My apology for what I said before. I need a hotfix about my temperament.
 
Following is the result after applying command sequence which you proposed:
 
Eshell V5.8.2  (abort with ^G)
1> {ok,Socket} = inet_tcp:listen(0,[{active, false}, {packet,2}, {reuseaddr, true}]).
{ok,#Port<0.577>}
2> {ok, Address} = inet:sockname(Socket).
** exception error: no match of right hand side value {error,ewouldblock}
3> {ok, Host} = inet:gethostname().
{ok,"Samuellee"}
4> 

another test:
 
Eshell V5.8.2  (abort with ^G)
1> {ok,Socket} = inet_tcp:listen(0,[{active, false}, {packet,2}, {reuseaddr, true}]).
{ok,#Port<0.644>}
2> 
2> {ok, Address} = inet:sockname(Socket).
** exception error: no match of right hand side value {error,ewouldblock}
3> 
3> {ok, Address} = inet:sockname(Socket).
** exception error: no match of right hand side value {error,einval}
4> 
4> {ok, Host} = inet:gethostname().
{ok,"Samuellee"}
5> 
 
 
Regards,
Samuel
 
 
> Date: Thu, 17 Feb 2011 09:01:36 +0100
> Subject: Re: [erlang-questions] [Windows] I can't create named node
> From: 
> To: 
> CC: ; ; 
> 
> Hi,
> 
> We are not aware of any general problems when running Erlang on Windows XP SP3.
> 
> It seems that you have general problems with the usage of the Socket
> API when you get
> this kind of trouble.
> 
> One way of finding out more could be to start an Erlang-node without
> distribution and then
> from the shell do the following:
> 
> 1> {ok,Socket} = inet_tcp:listen(0,[{active, false}, {packet,2},
> {reuseaddr, true}]).
> 
> 2> {ok, Address} = inet:sockname(Socket).
> 
> 3> {ok, Host} = inet:gethostname().
> 
> These are the steps taken when you get the failure. So one of these should
> result in the badmatch {error,EWOULDBLOCK}
> 
> I suspect that you have some firewall or internet security SW running
> and that it is
> intercepting the TCP socket API functions. All other communication problems
> we have had on Windows have been caused by some other SW interferring with
> socket API's ,making them return unexpected results.
> 
> /Kenneth Erlang/OTP Ericsson
> 
> On Wed, Feb 16, 2011 at 2:58 PM, Michael Turner
> <> wrote:
> > I get the same error response.
> >
> > I've been able to make nodes from the DOS command line, though, if that
> > would be an acceptable workaround.
> >
> > -michael turner
> >
> > On Wed, Feb 16, 2011 at 6:18 PM, Lukas Larsson <> wrote:
> >
> >> Ofcourse you are not supposed to handle that yourself. the most probable
> >> reason why you are not getting any help is because most of us here run on a
> >> *nix OS and hence have not run into many of the Erlang on Windows problems.
> >>
> >> I do know that this is not a general Win XP SP3 problem, but rather
> >> something with your specific setup. I'm assuming you have updated to the
> >> latest patches and made sure that your network is setup correctly? From
> >> what
> >> I understand EWOULDBLOCK is a way of the posix sockets to say to the
> >> application that it should try again later to do the listen on the socket
> >> because of whatever reason. Maybe there are permission problems?
> >>
> >> Have you tried starting the epmd program seperately? Maybe even try to run
> >> it on a seperate port? See http://www.erlang.org/doc/man/epmd.html for
> >> details
> >>
> >> I'm shooting in the dark here, but maybe I'll hit something.
> >>
> >> Lukas
> >>
> >>
> >> 2011/2/16 Lee Samuel <>
> >>
> >> >
> >> >
> >> > {error_logger,{{2011,2,16},{14,51,8}},"Protocol: ~p: register error:
> >> > ~p~n",["ine
> >> >
> >> >
> >> t_tcp",{{badmatch,{error,ewouldblock}},[{inet_tcp_dist,get_tcp_address,1},{inet_
> >> >
> >> >
> >> tcp_dist,listen,1},{net_kernel,start_protos,4},{net_kernel,start_protos,3},{net_
> >> >
> >> >
> >> kernel,init_node,2},{net_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p_
> >> > do_apply,3}]}]}
> >> >
> >> >
> >> {error_logger,{{2011,2,16},{14,51,8}},crash_report,[[{initial_call,{net_kernel,i
> >> >
> >> >
> >> nit,['Argument__1']}},{pid,<0.19.0>},{registered_name,[]},{error_info,{exit,{err
> >> >
> >> >
> >> or,badarg},[{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{ancestors,[n
> >> >
> >> >
> >> et_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[<0.16.0>,#Port<0.54>]},{dictio
> >> >
> >> >
> >> nary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,377},{sta
> >> > ck_size,24},{reductions,344}],[]]}
> >> >
> >> >
> >> {error_logger,{{2011,2,16},{14,51,8}},supervisor_report,[{supervisor,{local,net_
> >> >
> >> >
> >> sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pi
> >> >
> >> >
> >> d,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[[samuelcdf,shortn
> >> > ames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
> >> >
> >> >
> >> {error_logger,{{2011,2,16},{14,51,8}},supervisor_report,[{supervisor,{local,kern
> >> >
> >> >
> >> el_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined}
> >> >
> >> >
> >> ,{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanen
> >> > t},{shutdown,infinity},{child_type,supervisor}]}]}
> >> >
> >> >
> >> {error_logger,{{2011,2,16},{14,51,8}},std_info,[{application,kernel},{exited,{sh
> >> > utdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
> >> > {"Kernel pid
> >> > terminated",application_controller,"{application_start_failure,kern
> >> > el,{shutdown,{kernel,start,[normal,[]]}}}"}
> >> > Crash dump was written to: erl_crash.dump
> >> > Kernel pid terminated (application_controller)
> >> > ({application_start_failure,kerne
> >> > l,{shutdown,{kernel,start,[normal,[]]}}})
> >> >
> >> > Why no one want to help me? I am supposed to handle "EWOULDBLOCK" problem
> >> > myself? What a kind language...
> >> >
> >> > I googled every reason I guess, but still can't resolve problem. So I'm
> >> > here, then sad...
> >> >
> >> >
> >> > > From: 
> >> > > To: 
> >> > > Date: Wed, 16 Feb 2011 03:14:05 +0800
> >> > > Subject: RE: [erlang-questions] [Windows] I can't create named node
> >> > >
> >> > >
> >> > > The same procedure been tried at another computer(OS: Win7) which works
> >> > perfectly.
> >> > > But I still make no sense what reasons make the early one(OS: WinXP
> >> SP3)
> >> > can't work correctly. Who can light me on?
> >> > >
> >> > > Thanks.
> >> > >
> >> > >
> >> > > Samuel
> >> > >
> >> > >
> >> > > > From: 
> >> > > > To: 
> >> > > > Date: Tue, 15 Feb 2011 13:58:05 +0800
> >> > > > Subject: [erlang-questions] [Windows] I can't create named node
> >> > > >
> >> > > >
> >> > > > Neither -name nor -sname can make one successfully.
> >> > > >
> >> > > > If I open Eshell, and enter command:
> >> > > >
> >> > > > net_kernel:start(['', shortnames]).
> >> > > >
> >> > > > then I get the following response:
> >> > > >
> >> > > > =INFO REPORT==== 15-Feb-2011::12:00:05 ===
> >> > > > Protocol: "inet_tcp": register error:
> >> {{badmatch,{error,ewouldblock}},
> >> > > > [{inet_tcp_dist,get_tcp_address,1},
> >> > > > {inet_tcp_dist,listen,1},
> >> > > > {net_kernel,start_protos,4},
> >> > > > {net_kernel,start_protos,3},
> >> > > > {net_kernel,init_node,2},
> >> > > > {net_kernel,init,1},
> >> > > > {gen_server,init_it,6},
> >> > > > {proc_lib,init_p_do_apply,3}]}
> >> > > > {error,{shutdown,{child,undefined,net_sup_dynamic,
> >> > > > {erl_distribution,start_link,[[,shortnames]]},
> >> > > > permanent,1000,supervisor,
> >> > > > [erl_distribution]}}}
> >> > > >
> >> > > > I have no idea about this, please help me. :-)
> >> > > >
> >> > > >
> >> > > > Erlang version: Erlang R14B01 (erts-5.8.2)
> >> > >
> >> >
> >> >
> >>
> >
 		 	   		  


More information about the erlang-questions mailing list