rabbitMQ登录失败
查看日志发现报错
tail /var/log/rabbitmq/rabbit\@VM-OR-rabbit-MQ.log
=ERROR REPORT==== 12-Mar-2019::10:13:56 ===
webmachine error: path="/api/whoami"
"Unauthorized"
解决方法:
先查看用户列表
[root@VM-OR-rabbit-MQ ~]# rabbitmqctl list_users
Listing users ...
guest [administrator]
创建一个admin用户,密码也是admin
[root@VM-OR-rabbit-MQ ~]# rabbitmqctl add_user admin admin
Creating user "admin" ...
设置为管理员
[root@VM-OR-rabbit-MQ ~]# rabbitmqctl set_user_tags admin administrator
Setting tags for user "admin" to [administrator] ...
[root@VM-OR-rabbit-MQ ~]# rabbitmqctl list_users
Listing users ...
admin [administrator]
guest [administrator]
重启rabbitmq服务:
[root@VM-OR-rabbit-MQ ~]# service rabbitmq-server restart
Restarting rabbitmq-server: SUCCESS
rabbitmq-server.
rabbitMQ登录失败
查看日志发现报错
tail /var/log/rabbitmq/rabbit\@VM-OR-rabbit-MQ.log
=ERROR REPORT==== 12-Mar-2019::10:13:56 ===
webmachine error: path="/api/whoami"
"Unauthorized"
解决方法:
先查看用户列表
[root@VM-OR-rabbit-MQ ~]# rabbitmqctl list_users
Listing users ...
guest [administrator]
创建一个admin用户,密码也是admin
[root@VM-OR-rabbit-MQ ~]# rabbitmqctl add_user admin admin
Creating user "admin" ...
设置为管理员
[root@VM-OR-rabbit-MQ ~]# rabbitmqctl set_user_tags admin administrator
Setting tags for user "admin" to [administrator] ...
[root@VM-OR-rabbit-MQ ~]# rabbitmqctl list_users
Listing users ...
admin [administrator]
guest [administrator]
重启rabbitmq服务:
[root@VM-OR-rabbit-MQ ~]# service rabbitmq-server restart
Restarting rabbitmq-server: SUCCESS
rabbitmq-server.