在centos系统的/etc/hosts添加了 当前主机的 ‘ NAT分配的IP controller’,RabbitMQ添加用户报错。
在centos系统的/etc/hosts添加了 当前主机的 ‘ NAT分配的IP controller’,RabbitMQ添加用户报错。
rabbitMq添加用户 报错信息如下
[root@controller ~]# rabbitmqctl add_user openstack2 123456
Error: unable to connect to node rabbit@localhost: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@localhost]
rabbit@localhost:
* connected to epmd (port 4369) on localhost
* epmd reports node 'rabbit' running on port 25672
* TCP connection succeeded but Erlang distribution failed
* Hostname mismatch: node "rabbit@controller" believes its host is different. Please ensure that hostnames resolve the same way locally and on "rabbit@controller"
current node details:
- node name: 'rabbitmq-cli-99@controller'
- home dir: /var/lib/rabbitmq
- cookie hash: TWK04n7cLtARuM+8uTR9pw==
[root@controller ~]# rabbitmqctl add_user openstack2 123456 -n rabbit@controller
Creating user "openstack2"
[root@controller ~]#
解决:添加 -n rabbit@controller
rabbitmqctl add_user openstack2 123456 -n rabbit@controller