Reputation: 3564
I have rabbitmq-server
installed from the system package on Ubuntu 12, and no matter what I do it seems to ignore any configuration file.
Everything on the web says the server looks for /etc/rabbitmq/rabbitmq.conf
, but even if I create that file the server reports no config:
> /usr/sbin/rabbitmq-server
node : rabbit@ip-10-160-149-160
app descriptor : /usr/lib/rabbitmq/lib/rabbitmq_server-2.7.1/sbin/../ebin/rabbit.app
home dir : /var/lib/rabbitmq
config file(s) : (none)
I tried setting RABBITMQ_CONFIG_FILE
to point to that file, but that has no effect.
Fwiw, my rabbitmq-env.conf
seems to want to source scripts from /etc/rabbitmq.conf.d
, but these appear to be expected to be bash scripts, not Erlang config.
Upvotes: 13
Views: 10200
Reputation: 3564
I finally had some luck by just removing /etc/rabbitmq/rabbitmq-env.conf
altogether. I also noticed that the erlang config is rabbitmq.config and not 'conf', although fixing that still didn't fix the problem.
Removing rabbitmq-env.conf
at least allows the server to find rabbitmq.config
. Good lord, what a mess.
Upvotes: 15
Reputation: 1651
echo CONFIG_FILE=/etc/rabbitmq/my-rabbitmq.conf > /etc/rabbitmq/rabbitmq-env.conf
wget https://raw.githubusercontent.com/rabbitmq/rabbitmq-server/master/docs/rabbitmq.conf.example -O /etc/rabbitmq/my-rabbitmq.conf
systemctl restart rabbitmq-server.service
tail -n 50 /var/log/rabbitmq/[email protected]|head -n 20
see more: https://www.rabbitmq.com/configure.html#customise-environment
Upvotes: 0
Reputation: 111
1) RabbitMQ provides an example config file depending upon your distro you can find it in these directories,
Generic UNIX - $RABBITMQ_HOME/etc/rabbitmq/
Debian - /etc/rabbitmq/
RPM - /etc/rabbitmq/
Mac OS X (Macports) - ${install_prefix}/etc/rabbitmq/, the Macports prefix is usually /opt/local
Windows - %APPDATA%\RabbitMQ\
2) To create a configuration file on debian I moved the example file to /etc/rabbitmq directory.
3) renamed rabbitmq.config.example to rabbitmq.config
4) In rabbitmq-env.conf assigned CONFIGFILE variable as a to the path above config file but without mentioning file extension(.config)
CONFIGFILE=/etc/rabbitmq/rabbitmq
5) Restarted the rabbitmq-server. On debian
sudo /etc/init.d/rabbitmq-server start
Upvotes: 6
Reputation: 11
in sum
1. Only rabbitmq.config file without rabbitmq-env.conf
works, but need to reset the server: /etc/init.d/rabbitmq-server (start, stop)
, do not: rabbitmqctl (stop_app, reset, start_app)
2. rabbitmq.config and rabbitmq-env.conf
it may be, but: in rabbitmq-env.conf
must specify the path: CONFIG_FILE = /etc/rabbitmq/rabbitmq
without config ext!
At least for me :) Debian 7.0 Rabbit 3.1 erl 1.15
Upvotes: 0
Reputation: 11
in sum
1.tylko rabbitmq.config file without rabbitmq-env.conf works, but need to reset the server:
/etc/init.d/rabbitmq-server
(start, stop), do not:
rabbitmqctl
(stop_app, reset, start_app)
2 rabbitmq.config and rabbitmq-env.conf it may be, but:
in RabbitMQ-env.conf must specify the path:
CONFIG_FILE = /etc/rabbitmq/rabbitmq
without config ext!
At least for me :) Debian 7.0 Rabbit 3.1 erl 1.15
Upvotes: 1
Reputation: 18944
Setting RABBITMQ_CONFIG_FILE works, but you are supposed to set it to the filename without the .config extension! That means the actual file must have the extension .config.
I wasted quite a lot of time today to figure this out.
Upvotes: 12
Reputation: 10349
I had success with putting the config in /etc/rabbitmq/rabbitmq.config
. No need to remove /etc/rabbitmq/rabbitmq-env.conf
.
RabbitMQ 2.7.1 on Ubuntu 12.04
Upvotes: 4