在 rabbitmq 中创建新节点后节点未启动

Node not starting after creating a new node in rabbitmq

我想创建一个包含 3 个节点的集群。我用命令创建了两个节点:

RABBITMQ_NODE_PORT=5680 RABBITMQ_NODENAME=rabbit1@localhost rabbitmq-server -detached

现在,当我尝试停止节点以将其加入集群时,它给我错误消息,指出节点根本没有启动。

到目前为止我所做的是安装 rabbitmq 并使用 rabbitmq-server 启动它。

兔子1@localhost.log

Error description:
    init:do_boot/3
    init:start_em/1
    rabbit:start_it/1 line 480
    rabbit:broker_start/0 line 356
    rabbit:start_apps/2 line 575
    app_utils:manage_applications/6 line 126
    lists:foldl/3 line 1263
    rabbit:'-handle_app_error/1-fun-0-'/3 line 696
throw:{could_not_start,rabbitmq_mqtt,
       {rabbitmq_mqtt,
        {{shutdown,
          {failed_to_start_child,'rabbit_mqtt_listener_sup_:::1883',
           {shutdown,
            {failed_to_start_child,
             {ranch_listener_sup,{acceptor,{0,0,0,0,0,0,0,0},1883}},
             {shutdown,
              {failed_to_start_child,ranch_acceptors_sup,
               {listen_error,
                {acceptor,{0,0,0,0,0,0,0,0},1883},
                eaddrinuse}}}}}}},
         {rabbit_mqtt,start,[normal,[]]}}}}
Log file(s) (may contain more information):
   /usr/local/var/log/rabbitmq/rabbit1@localhost.log
   /usr/local/var/log/rabbitmq/rabbit1@localhost_upgrade.log

航站楼:

Most common reasons for this are:

 * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
 * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
 * Target node is not running

In addition to the diagnostics info below:

 * See the CLI, clustering and networking guides on https://rabbitmq.com/documentation.html to learn more
 * Consult server logs on node rabbit1@localhost
 * If target node is configured to use long node names, don't forget to use --longnames with CLI tools

DIAGNOSTICS
===========

attempted to contact: [rabbit1@localhost]

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

Current node details:
 * node name: 'rabbitmqcli-9206-rabbit@localhost'
 * effective user's home directory: /Users/yashparekh
 * Erlang cookie hash: +/3SPQl4T2w3zA11j1+o4Q==

我希望 stop_app 命令能够工作以便能够将其加入集群。 请让我知道哪里出错了。

提前致谢。

{failed_to_start_child,
             {ranch_listener_sup,{acceptor,{0,0,0,0,0,0,0,0},1883}},
             {shutdown,
              {failed_to_start_child,ranch_acceptors_sup,
               {listen_error,
                {acceptor,{0,0,0,0,0,0,0,0},1883},
                eaddrinuse}}}}}}},

表示端口1883(MQTT端口)已经被占用。您还必须动态设置此端口。