关于long node name启动失败的问题

今天在一台Red Hat Enterprise Linux Server release 5.4 (Tikanga)上
执行erl -name sfsdf 报如下错误:
[root@cloudbox ejabberd]#erl -name sfsdf
{error_logger,{{2011,4,13},{14,28,4}},"Can't set long node name!\nPlease check your configuration\n",[]}
{error_logger,{{2011,4,13},{14,28,4}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.21.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[<0.18.0>]},{dictionary,[{longnames,true}]},{trap_exit,true},{status,running},{heap_size,377},{stack_size,24},{reductions,629}],[]]}
{error_logger,{{2011,4,13},{14,28,4}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfa,{net_kernel,start_link,[[sfsdf,longnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2011,4,13},{14,28,4}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfa,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2011,4,13},{14,28,4}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

结果发现还是/etc/hosts配置和 hostname不一致引起的
把/etc/hosts中的
127.0.0.1    localhost.localdomain localhost
改成:
127.0.0.1    cloudbox.localdomain cloudbox
即可

你可能感兴趣的:(.net,linux)