newby questions

Pat29 <>
Sun Nov 28 16:09:23 CET 2004


Hello,

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]}
{error_logger,{{2004,11,28},{14,47,58}},crash_report,[[{pid,<0.18.0>},{registere
d_name,net_kernel},{error_info,{error,badarg}},{initial_call,{gen,init_it,[gen_s
erver,<0.15.0>,<0.15.0>,{local,net_kernel},net_kernel,{database,shortnames,15000
},[]]}},{ancestors,[net_sup,kernel_sup,<0.8.0>]},{messages,[]},{links,[<0.15.0>]
},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,
233},{stack_size,21},{reductions,293}],[]]}
{error_logger,{{2004,11,28},{14,47,58}},supervisor_report,[{supervisor,{local,ne
t_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{
pid,undefined},{name,net_kernel},{mfa,{net_kernel,start_link,[[database,shortnam
es]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2004,11,28},{14,47,58}},supervisor_report,[{supervisor,{local,ke
rnel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefine
d},{name,net_sup},{mfa,{erl_distribution,start_link,[]}},{restart_type,permanent
},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2004,11,28},{14,47,58}},crash_report,[[{pid,<0.7.0>},{registered
_name,[]},{error_info,{shutdown,{kernel,start,[normal,[]]}}},{initial_call,{appl
ication_master,init,[<0.5.0>,<0.6.0>,{appl_data,kernel,[application_controller,e
rl_reply,auth,boot_server,code_server,disk_log_server,disk_log_sup,erl_prim_load
er,error_logger,file_server,file_server_2,fixtable_server,global_group,global_na
me_server,heart,init,kernel_config,kernel_sup,net_kernel,net_sup,rex,user,os_ser
ver,ddll_server,erl_epmd,inet_db,pg2],undefined,{kernel,[]},[application,applica
tion_controller,application_master,application_starter,auth,code,code_aux,packag
es,code_server,dist_util,erl_boot_server,erl_distribution,erl_prim_loader,erl_re
ply,erlang,error_handler,error_logger,file,file_server,old_file_server,file_io_s
erver,prim_file,global,global_group,global_search,group,heart,inet6_tcp,inet6_tc
p_dist,inet6_udp,inet_config,inet_hosts,inet_gethost_native,inet_tcp_dist,init,k
ernel,kernel_config,net,net_adm,net_kernel,os,ram_file,rpc,user,user_drv,user_su
p,disk_log,disk_log_1,disk_log_server,disk_log_sup,dist_ac,erl_ddll,erl_epmd,ert
s_debug,gen_tcp,gen_udp,prim_inet,inet,inet_db,inet_dns,inet_parse,inet_res,inet
_tcp,inet_udp,pg2,seq_trace,socks5,socks5_auth,socks5_tcp,socks5_udp,wrap_log_re
ader,zlib,otp_ring0],[],infinity,infinity},normal]}},{ancestors,[<0.6.0>]},{mess
ages,[{'EXIT',<0.8.0>,normal}]},{links,[<0.6.0>,<0.5.0>]},{dictionary,[]},{trap_
exit,true},{status,running},{heap_size,610},{stack_size,21},{reductions,1080}],[
]]}
{error_logger,{{2004,11,28},{14,47,58}},std_info,[{application,kernel},{exited,{
shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,shutdown}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) (shutdown)

D:\Pat29\erlang\Erlang Book\ch8\ex1\src>

Also when i tried this command (and some GUI applications)

D:\erl5.4.2.1\bin>erl
Execution user profile in HOME/.erlang
Eshell V5.4.2.1  (abort with ^G)
1> toolbar:start().

=ERROR REPORT==== 28-Nov-2004::15:28:15 ===
Error in process <0.34.0> with exit value: 
{{badmatch,{error,enotsock}},[{gstk_p
ort_handler,init,2}]}

I looked at the gstk_port_handler.erl file:

%% ------------------------------------------------------------
%%                  INTERFACE FUNCTIONS
%% ------------------------------------------------------------

% Note: gs is not a true application so this doesn't work :-(
% Communication protocol between Erlang backend and wish program
% that can be set in the application environment, e.i. tested
% with "erl -gs backend_comm socket"
%
%   backend_comm = socket | port

I tried first D:\erl5.4.2.1\bin>erl -gs bachend_com socket but failed.

D:\erl5.4.2.1\bin>erl -gs backend_comm port worked fine.

Sorry again but i don't understand.
Perhaps it's the same problem ([inet_tcp,enotsock] backend_comm socket) ?

Best regards. 





More information about the erlang-questions mailing list