Ejabberd:无法创建cookie错误

时间:2014-08-02 17:00:51

标签: erlang ejabberd

我服务器上的ejabberdctl status提供以下错误日志:

{error_logger,{{2014,7,27},{16,35,10}},"Failed to create cookie file '/opt/src/ejabberd-13.12/rel/ejabberd/var/lib/ejabberd/.erlang.cookie': eacces",[]}
{error_logger,{{2014,7,27},{16,35,10}},crash_report,[[{initial_call,{auth,init,['Argument__1']}},{pid,<0.19.0>},{registered_name,[]},{error_info,{exit,{"Failed to create cookie file '/opt/src/ejabberd-13.12/rel/ejabberd/var/lib/ejabberd/.erlang.cookie': eacces",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}},{ancestors,[net_sup,kernel_sup,<0.10.0>]},{messages,[]},{links,[<0.17.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,27},{reductions,1354}],[]]}
{error_logger,{{2014,7,27},{16,35,10}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{"Failed to create cookie file '/opt/src/ejabberd-13.12/rel/ejabberd/var/lib/ejabberd/.erlang.cookie': eacces",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}},{offender,[{pid,undefined},{name,auth},{mfargs,{auth,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2014,7,27},{16,35,10}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file '/opt/src/ejabberd-13.12/rel/ejabberd/var/lib/ejabberd/.erlang.cookie': eacces",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}}},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2014,7,27},{16,35,10}},crash_report,[[{initial_call,{application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}},{pid,<0.9.0>},{registered_name,[]},{error_info,{exit,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file '/opt/src/ejabberd-13.12/rel/ejabberd/var/lib/ejabberd/.erlang.cookie': eacces",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,133}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}},{ancestors,[<0.8.0>]},{messages,[{'EXIT',<0.10.0>,normal}]},{links,[<0.8.0>,<0.7.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,27},{reductions,117}],[]]}
{error_logger,{{2014,7,27},{16,35,10}},std_info,[{application,kernel},{exited,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file '/opt/src/ejabberd-13.12/rel/ejabberd/var/lib/ejabberd/.erlang.cookie': eacces",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}}}},{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{\"Failed to create cookie file '/opt/src/ejabberd-13.12/rel/ejabberd/var/lib/ejabberd/.erlang.cookie': eacces\",[{auth,init_cookie,0,[{file,\"auth.erl\"},{line,285}]},{auth,init,1,[{file,\"auth.erl\"},{line,139}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,239}]}]}}}}},{kernel,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file '/opt

有人可以帮我调试吗?

1 个答案:

答案 0 :(得分:3)

错误的核心是"Failed to create cookie file '/opt/src/ejabberd-13.12/rel/ejabberd/var/lib/ejabberd/.erlang.cookie': eacces" - 这表明某种访问被拒绝的问题。看起来你可能在某个地方有一个非绝对路径 - 通常cookie进入/var/lib/ejabberd。鉴于似乎是相对路径+访问被拒绝错误,我猜测您可能还会遇到可能需要其他配置的AppArmor类型产品。