报错现象
[root@controller ~]# rabbitmqctl add_user openstack RABBIT_PASS
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"
..........
解决方法
注:将进程杀掉
kill -9
ps -ef | grep rabbitmq | grep -v grep | awk '{print $2}' | xargs kill -9
启动rabbitmq-server
[root@controller ~]# systemctl start rabbitmq-server
查询rabbitmq状况
[root@controller ~]# rabbitmqctl status
Status of node rabbit@localhost
[{pid,34251},
{running_applications,
[{rabbit,"RabbitMQ","3.6.16"},
{mnesia,"MNESIA CXC 138 12","4.14.3"},
{ranch,"Socket acceptor pool for TCP protocols.","1.3.2"},
{rabbit_common,
"Modules shared by rabbitmq-server and rabbitmq-erlang-client",
"3.6.16"},
{xmerl,"XML parser","1.3.14"},
{ssl,"Erlang/OTP SSL application","8.1.3.1"},
{os_mon,"CPO CXC 138 46","2.4.2"},
{compiler,"ERTS CXC 138 10","7.0.4.1"},
{public_key,"Public key infrastructure","1.4"},
{crypto,"CRYPTO","3.7.4"},
.......
再次验证
[root@controller ~]# rabbitmqctl add_user openstack RABBIT_PASS
Creating user "openstack"