rabbitmq 安装完成之后 会有个可执行文件 rabbitmqctl 通过这个可执行文件去添加用户,报错
报错情况如下:
$ rabbitmqctl add_user seabed seabed
Error: unable to connect to node rabbit@DuniServer: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@DuniServer]
rabbit@DuniServer:
* connected to epmd (port 4369) on DuniServer
* epmd reports: node 'rabbit' not running at all
other nodes on DuniServer: ['rabbitmq-cli-73']
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-73@localhost'
- home dir: /var/lib/rabbitmq
- cookie hash: 4ffMy2FEWYfwqLhhbUdrCw==
解决办法是编辑 /etc/hostname 修改一下hostname 然后执行命名重启rabbitmq
$ /sbin/service rabbitmq-server stop
$ /sbin/service rabbitmq-server start
即可解决