4
votes

Is there any reason that the rabbitmq-management plugin wouldn't work when I'm using 'rabbitmq-multi' to spin up a cluster of nodes on my desktop? Or, more precisely, that the management plugin would cause that spinup to fail?

I get Error: {node_start_failed,normal} when rabbitmq-multi starts rabbit_1@localhost The first node, rabbit@localhost seems to start okay though.

If I take out the management plugins, all the nodes start up (and then cluster) fine. I think I'm using a recent enough Erlang version (5.8/OTP R14A according to the README in my erl5.8.2 folder). I'm using all the plugins that are listed as required on the plugins page, including mochiweb, webmachine, amqp_client, rabbitmq-mochiweb, rabbitmq-management-agent, and rabbitmq-management. Those plugins, and only those plugins.

1

1 Answers

2
votes

The problem is that rabbitmq-multi only assigns sequential ports for AMQP, not HTTP (or STOMP or AMQPS or anything else the broker may open). Therefore each node tries to listen on the same port for the management plugin and only the first succeeds. rabbitmq-multi will be going away in the next release; this is one reason why.

I think you'll want to start the nodes without using rabbitmq-multi, just with multiple invocations of rabbitmq-server, using environment variables to configure each node differently. I use a script like:

start-node.sh:

#!/bin/sh 
RABBITMQ_NODE_PORT=$1 RABBITMQ_NODENAME=$2 \ 
RABBITMQ_MNESIA_DIR=/tmp/rabbitmq-$2-mnesia \ 
RABBITMQ_PLUGINS_EXPAND_DIR=/tmp/rabbitmq-$2-plugins-scratch \ 
RABBITMQ_LOG_BASE=/tmp \ 
RABBITMQ_SERVER_START_ARGS="-rabbit_mochiweb port 5$1" \ 
/path/to/rabbitmq-server -detached

and then invoke it as

start-node.sh 5672 rabbit
start-node.sh 5673 hare