Stuck with “A cluster on a single machine” explained in https://www.rabbitmq.com/clustering.html

本秂侑毒 提交于 2019-12-23 03:39:31

问题


I am following "A cluster on a single machine" explained in https://www.rabbitmq.com/clustering.html but it is not working as it is. I am using ubuntu 14.04 64 bit.

root@sunny-workstation:~# RABBITMQ_NODE_PORT=5673 RABBITMQ_SERVER_START_ARGS="-    
rabbitmq_management listener [{port,15673}]" RABBITMQ_NODENAME=hare rabbitmq-server &
[1] 17990

root@sunny-workstation:~# 
          RabbitMQ 3.2.4. Copyright (C) 2007-2013 GoPivotal, Inc.
##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
##  ##
##########  Logs: /var/log/rabbitmq/hare.log
######  ##        /var/log/rabbitmq/hare-sasl.log
##########
          Starting broker...
BOOT FAILED
===========

Error description:
{could_not_start,rabbitmq_stomp,
   {{shutdown,
        {failed_to_start_child,'rabbit_stomp_listener_sup_:::61613',
            {shutdown,
                {failed_to_start_child,tcp_listener,
                    {cannot_listen,{0,0,0,0,0,0,0,0},61613,eaddrinuse}}}}},
    {rabbit_stomp,start,[normal,[]]}}}

Above error indicates that 61613 address already in use. Stomp is listening on 61613 port. I am exploring how to change/define stomp listener port while creating a new node. Please help if somebody already know solution.


回答1:


I run into the same problem, but the proposed solution only partly solved my problem. After having solved the stomp issue, the next one was mqtt :-( But figuring that one out wasn't too hard :-) First server started without parameters:

rabbitmq-server -detached

Second server started with modified parameters:

RABBITMQ_NODE_PORT=5673 RABBITMQ_SERVER_START_ARGS="
     -rabbitmq_management listener [{port,15673}] 
     -rabbitmq_stomp tcp_listeners [61614] 
     -rabbitmq_mqtt tcp_listeners [1884]
     " RABBITMQ_NODENAME=hare rabbitmq-server -detached

It seems the more plugins are added to RabbitMQ the more issues you will run into when starting it on a single machine. So with the next release you might have to add some more args




回答2:


Thanks Matthlas from RabbitMQ. It works like a dream with following commands.

$ RABBITMQ_NODE_PORT=5673 RABBITMQ_NODENAME=hare RABBITMQ_SERVER_START_ARGS="-   
 rabbitmq_stomp tcp_listeners [61614]" rabbitmq-server -detached
$ RABBITMQ_NODE_PORT=5674 RABBITMQ_NODENAME=flopsy RABBITMQ_SERVER_START_ARGS="-   
rabbitmq_stomp tcp_listeners [61615]" rabbitmq-server -detached



回答3:


I never tried it, but have you tried to set RABBITMQ_CONFIG_FILE and set the configurations into different files?



来源:https://stackoverflow.com/questions/23738152/stuck-with-a-cluster-on-a-single-machine-explained-in-https-www-rabbitmq-com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!