Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Celery and Flower: nothing in broker tab

I'm trying to configure Flower, Celery's monitoring tool. This works ok overall, but I cannot see anything under the broker tab. I can see stuff under "workers", 'tasks' and 'monitor' and the graphs are updating. I'm using the following to start flower:

celery flower --broker=amqp://<username>:<password>@<ipaddress>:5672/vhost_ubuntu --broker_api=http://<username>:<password>@<ipaddress>:15672/api

Relevant error message I'm receiving is: Unable to get broker info: 401 Client Error: Unauthorized

I can login to RabbitMQ management via http://:15672/ with username guest and password guest

Any ideas as to why I can't see the messages under the broker tab?

like image 345
wiwa1978 Avatar asked Oct 29 '14 18:10

wiwa1978


2 Answers

This reply might be a few years too late, but I finally figured out why I was having the same issue. Once you enable the rabbitmq_management plugin, you need to give the user that you are using to connect to rabbitmq permission to use it. At heart, the rabbitmq-management plugin gives you a user interface to check on your amqp server, if you credentials work to login to the portal they should work with the API once the administrator tag is added.

sudo rabbitmqctl set_user_tags <username> administrator

like image 106
korono89 Avatar answered Nov 02 '22 03:11

korono89


You need to enable flower to access rabbitmq. For that run these commands in your terminal

sudo rabbitmq-plugins enable rabbitmq_management
sudo service rabbitmq-server restart

Also make sure that current user has relevant permissions on rabbitmq.

Now if you run flower, it should show the broker.

Also there is a bug in older version of tornado. Make sure to upgrage tornado so that flower works properly.

pip install --upgrade tornado
like image 4
Pandikunta Anand Reddy Avatar answered Nov 02 '22 03:11

Pandikunta Anand Reddy