无法在ubuntu 10.04上启动rabbitmq服务器

我有一个版本10.04的ubuntu服务器,并使用sudo apt-get install rabbitmq-server安装了rabbitmq-server.

当我尝试运行rabbitmq-server时,它返回了以下错误

{error_logger,{{2014,7,7},{12,10,27}},"Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces",[]}
{error_logger,{{2014,7,7},{12,10,27}},crash_report,[[{initial_call,{auth,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{"Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces",[{auth,init_cookie,0},{auth,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]},[{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{ancestors,[net_sup,kernel_sup,<0.10.0>]},{messages,[]},{links,[<0.18.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,24},{reductions,598}],[]]}
{error_logger,{{2014,7,7},{12,10,27}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{"Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces",[{auth,init_cookie,0},{auth,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{offender,[{pid,undefined},{name,auth},{mfa,{auth,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2014,7,7},{12,10,27}},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,{{2014,7,7},{12,10,27}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

那么它是什么以及如何避免它?

最佳答案
当我意外更改权限时,我收到了这样的错误.所以,解决它:

chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie

chmod 600 /var/lib/rabbitmq/.erlang.cookie

转载注明原文:无法在ubuntu 10.04上启动rabbitmq服务器 - 代码日志