Enable Broker API on RabbitMQ
8 Dec 2015I had some issue when installing flower last week, Flower always failed to inspect the broker. It turn out I need to enable the RabbitMQ management and set the user for management/broker api.
Maybe this could help someone out there with the same issue.
Setup user and virtual host
Create a new user and virtual host for your project.
# Add user
$ sudo rabbitmqctl add_user <username> <password>
# Add virtual host
$ sudo rabbitmqctl add_vhost <virtualhost>
#Grant permission
$ sudo rabbitmqctl set_permissions -p <virtualhost> <username> ".*" ".*" ".*"
Please change <username>
, <password>
, <virtualhost>
with your own credential.
Enable Broker API
All we need to do is enable the rabbitmq_management
and set a previous user for it.
$ sudo rabbitmq-plugins enable rabbitmq_management
$ sudo rabbitmqctl set_user_tags <username> management
$ sudo service rabbitmq-server restart
You should see some information on Celery Broker tab now.