Узел не запускается после создания нового узла в rabbitmq - PullRequest
0 голосов
/ 06 мая 2019

Я хочу создать кластер из 3 узлов. Я создал два узла с командой:

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

Теперь, когда я пытаюсь остановить узел, чтобы присоединить его к кластеру, выдается сообщение об ошибке, указывающее, что узел вообще не запущен.

То, что я сделал до сих пор, установил rabbitmq и запустил его, используя rabbitmq-сервер.

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 Ответ

1 голос
/ 06 мая 2019
{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) уже используется.Вы также должны установить этот порт динамически.

...