I have a c# code that installs rabbitmq on windows machines.
After running rabbitmq-service install
and rabbitmq-service start
I am running rabbitmq-plugins enable rabbitmq_management
.
At the end I get:
set 3 plugins. Offline change; changes will take effect at broker restart.
I would like to know if I can avoid this restart. It's taking a lot of time and slowing the installation process. I'm pretty sure that at least one time during my tests I wasn't required to do that but I can't reproduce...
You might be running into the issue we are addressing in this pull request:
https://github.com/rabbitmq/rabbitmq-server-release/pull/82
You don't say which version of RabbitMQ or Windows you are using, nor do you say how you are installing RabbitMQ - are you using the .exe
install package or the .zip
package? This is all very important information to share when you ask questions about RabbitMQ (or any software, really).
When you install RabbitMQ and start it for the first time, Erlang will create cookie files. You can read this document to see where these files are created - it depends on your version of Windows and Erlang (which is why I need to know both!).
When you run commands like rabbitmqctl.bat
or rabbitmq-plugins.bat
, the cookie is read to establish a connection to RabbitMQ. If the cookie file in your user's home directory does not match the cookie being used by the server, you will see an "offline change" being made.
What you should do if you are using either the .exe
installer or the .zip
installer is, after RabbitMQ starts, be sure to copy the .erlang.cookie
file from where RabbitMQ is reading it (most likely C:\WINDOWS\system32\config\systemprofile\.erlang.cookie
) to your user's home directory (C:\Users\my-account\.erlang.cookie
).
Then, run rabbitmq-plugins.bat enable rabbitmq_management
and the plugin will be enabled at run-time.
An alternative is to pre-create the enabled_plugins
file and save it to %AppData%\RabbitMQ\enabled_plugins
before starting RabbitMQ the first time. %AppData%
is the application directory of the admin user account you're using to install and start / stop RabbitMQ.
To enable the management plugin, that file should contain the following text:
[rabbitmq_management].