views:

22

answers:

2

I'm running RabbitMQ V.2.0.0. on a Linux machine. The mnesia base is current the default, but the within that directory Rabbit creates directories, eg. [email protected].

The ip in the directory name is based on the inet addr of the machine. This directories hold information about user, exchanges, vhost (I think).

My question is, how can I fix/config these directory names with ip to be not based on ip?

A: 

It seems you can edit the scripts files (rabbitmq-server, rabbitmq-mulit and rabbitmqcti). In these scripts at the top is a hostname variable.

I set the hostname to localhost and restarted.

This is not the best, but good enough for my requirements. The hostname must be a proper address, it cannot be something arbitrary.

dom farr
In addition, you cannot address a RabbitMQ node by its IP address. i.e. rabbit@localhost - good; [email protected] - bad
scvalex
That's a good point. thanks.
dom farr
A: 

To change the Mnesia directory, just set MNESIA_DIR in /etc/rabbitmq/rabbitmq.conf.

Also, a great place to ask RabbitMQ related questions is on the rabbitmq-discuss mailing list.

scvalex
The root directory isn't the issue. It's the directories within that have caused issues. Because I'm using Amazon EC2 instances the internal IP can change on restart. When that happens I lose my exchanges, queues, vhost, etc.
dom farr
This isn't the root directory. MNESIA_BASE is the root, MNESIA_DIR is normally MNESIA_BASE/NODENAME, but you can overwrite that.
scvalex