执行:

rabbitmqctl add_user openstack passw0rd

报出:

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

  * suggestion: hostname mismatch?

  * suggestion: is the cookie set correctly?

  * suggestion: is the Erlang distribution using TLS?

current node details:

- node name: 'rabbitmq-cli-54@controller'

- home dir: /var/lib/rabbitmq

解决方法:其他都没有什么问题,原来是由于# bash 又开了一个shell,# exit 退出到原来的shell执行就行了。