无法在节点rabbitmq上执行操作

ali*_*rey 5 rabbitmq rabbitmqctl

尝试使用rabbit@localhost 设置rabbitmq,但是:

c:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.18\sbin>rabbitmqctl status
Error: unable to perform an operation on node 'rabbit@localhost'. Please see diagnostics information and suggestions below.
Run Code Online (Sandbox Code Playgroud)

Erlang + Rabbitmq + Win7。我已经启动了 Rabbitmq 服务,它可以工作,但是节点是使用随机名称自动创建的

attempted to contact: [rabbit@localhost]

rabbit@localhost:
  * connected to epmd (port 4369) on localhost
  * epmd reports: node 'rabbit' not running at all
                  no other nodes on localhost
  * suggestion: start the node

Current node details:
 * node name: 'rabbitmqcli-10012-rabbit@localhost'
 * effective user's home directory: C:\Users\andrey
 * Erlang cookie hash: LdQNaRpK/HR5vh8yRc6A2w==
Run Code Online (Sandbox Code Playgroud)

ali*_*rey 1

接下来的步骤解决了我的问题:

0)添加set RABBITMQ_NODENAME=rabbit@localhostrabbitmq-env.bat

1)rabbitmq.conf和rabbitmq-env.conf不同。但应该是一样的:

CONFIG_FILE=C:\Users\<youruser>\AppData\Roaming\RabbitMQ\rabbitmq
NODE_IP_ADDRESS=127.0.0.1
NODENAME=rabbit@localhost
Run Code Online (Sandbox Code Playgroud)