其他分享
首页 > 其他分享> > Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces

Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces

作者:互联网

在部署rabbitmq集群的时候,将A服务器上的.erlang.cookie 复制到 B服务器上的 .erlang.cookie

然后,在启动B服务的上rabbitmq时,报错

Error: Failed to initialize erlang distribution: {{shutdown,
                                                   {failed_to_start_child,
                                                    auth,
                                                    {"Error when reading /var/lib/rabbitmq/.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}]}]}}},
                                                  {child,undefined,
                                                   net_sup_dynamic,
                                                   {erl_distribution,
                                                    start_link,
                                                    [['rabbitmq-cli-68',
                                                      shortnames]]},
                                                   permanent,1000,supervisor,
                                                   [erl_distribution]}}.

 


这里提示的,eaccess 错误就是权限问题,新复制过来的cookie ,当前不可用,需要授权

我是通过 rpm 安装的 rabbitmq,执行:

chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
即可。

如果是通过 解压缩方式安装的,执行:

chown rabbitmq:rabbitmq ~/.erlang.cookie
即可
————————————————
原文链接:https://blog.csdn.net/u014209205/article/details/106647229

标签:lib,when,rabbitmq,cookie,auth,erl,erlang
来源: https://www.cnblogs.com/bujingyu/p/16586217.html