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

时间:2019-05-06 05:49:38

标签: rabbitmq rabbitmqctl

我想创建一个由3个节点组成的集群。我用命令创建了两个节点:

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

现在,当我尝试停止该节点以便将其加入集群时,它提示我该节点根本未启动。

到目前为止,我已经完成了安装rabbitmq的工作,并使用rabbitmq-server启动了它。

rabbit1@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命令能够正常运行,以便能够将其加入集群。 请让我知道我要去哪里了。

谢谢。

1 个答案:

答案 0 :(得分:1)

{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端口)已被使用。您还必须动态设置此端口。