RabbitMQ:Erlang distribution failed解决方案

前言node

        系统版本:CentOS Linux release 7.7.1908 (Core)cookie

        经过rabbitmqctl add_user admin 12345指令,给rabbitmq添加用户提示出错:ide

[root@localhost perl]# rabbitmqctl add_user admin 12345
Error: unable to connect to node rabbit@localhost: nodedownserver

DIAGNOSTICS
===========rabbitmq

attempted to contact: [rabbit@localhost]rem

rabbit@localhost:
  * connected to epmd (port 4369) on localhost
  * epmd reports node 'rabbit' running on port 25672
  * TCP connection succeeded but Erlang distribution failedhash

  * Authentication failed (rejected by the remote node), please check the Erlang cookieit


current node details:
- node name: 'rabbitmq-cli-49@localhost'
- home dir: /root
- cookie hash: BgvEr+lGkDjLTQzT85cpyw==io


解决方案class

1)搜索.erlang.cookie文件

[root@localhost mnesia]# find / -name *.cookie
/root/.erlang.cookie
/opt/rabbitmq_server-3.6.10/.erlang.cookie

2)覆盖掉/root/.erlang.cookie文件

cp /opt/rabbitmq_server-3.6.10/.erlang.cookie  /root/


缘由

RabbitMQ的.erlang.cookie和用户的cookie冲突了,须要用RabbitMQ的cookie去覆盖用户的cookie
相关文章
相关标签/搜索