1、启动异常,报错
Error: unable to perform an operation on node 'rabbit@wang'. Please see diagnostics information and suggestions below.
Most common reasons for this are:
* Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
* CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
* Target node is not running
……
Current node details:
* node name: 'rabbitmqcli-842-rabbit@wang'
* effective user's home directory: c:/Users/Administrator
* Erlang cookie hash:
错误原因:Erlang 的 cookie 出现问题,有两个 erlang.cookie
1、linux下: 将/root/.erlang.cookie 拷贝至 ~/.erlang.cookie
2、windows下: C:\Windows\System32\config\systemprofile.erlang.cookie 拷贝至 C:\Users\Administrator.erlang.cookie
然后重新启动服务即可
账号相关
//查看用户
rabbitmqctl list_users
//修改密码
rabbitmqctl change_password Username Newpassword
//删除用户
rabbitmqctl delete_user 用户名
//添加用户
rabbitmqctl add_user 用户名 密码
//给新用户赋以管理权限
rabbitmqctl set_user_tags 用户名 administrator
//给用户赋以其他权限
rabbitmqctl set_permissions -p / 用户名 "." "." ".*"