[rabbitmq-discuss] possible bug starting rabbit with NODENAME set?

Matthias Radestock matthias at lshift.net
Fri May 16 23:22:03 BST 2008


Edwin Fine wrote:
> I can also successfully run /usr/sbin/rabbitmq-server from the command 
> line if I change -sname to -name. I just have to make sure that I change 
> the actual mnesia dir to match the NODENAME.

By default the mnesia dir is based on the NODENAME. By "change" do you 
mean "rename", so you retain the existing data across the move? That 
wouldn't be a good idea - mnesia can get very confused if you its dirs 
between nodes.

> But I think that in addition to the rabbit_multi script, 
> rabbit_multi.erl will need some serious tweaking. I think it was written 
> with local clustering in mind and did not adequately consider the effect 
> of using fully-qualified domain names with -name.


As a bit of background, rabbitmq-multi was introduced to give people a 
quick and easy way to set up a cluster on their local machine. It was 
never intended to cope with more complex set ups. There is all kinds of 
tweaking a user may want to do to their cluster and the rabbit start up 
in general. The scripts can only ever cater for a subset of that.

It's usually not that hard to construct your own scripts to start up 
rabbit in the particular way that suits your environment, so we would 
expect users to do just that.

> Firstly, rabbit_multi.erl hard-codes the node name "rabbit":

I filed a bug for that a few days ago.

> localnode would strip off everything after the "@" anyway. Now if
> rabbit at myexample.com <mailto:rabbit at myexample.com> were running
> locally, but using -name, the rpc call would fail because erlang
> would want the full node name.

As I said above, the scripts and supporting code were designed for 
-sname, not -name. However, they can probably be adjusted to cope with 
the latter. We will look into that.

> Just prior to this, to add insult to injury, the code blasts any 
> environment values that might have existed.

Indeed. I filed a bug for that a few days ago too.

> I respectfully suggest that some more thought needs to go into 
> rabbit_multi.erl and perhaps the startup/node name architecture.

Thanks for your analysis. Most of the points you raised should be 
addressed in the next RabbitMQ release.


More information about the rabbitmq-discuss mailing list