How to see broker information when using Flower?
Asked Answered
D

2

6

I am running flower by the command:

celery flower --broker=amqp://<username>:<password>@localhost:5672/<virtualhostname> --broker_api=http://<username>:<password>@localhost:5672/api/

I can see the tasks info, the worker info etc.

But as soon as I go to /broker, I see the error in console:

RabbitMQ management API call failed: Stream closed

and the UI remains blank with no data.

Interestingly whenever I go to /monitor, I see the same error in the console, however, after a couple of seconds graphs gets to load on the monitor page.

But for broker page nothing happens even after waiting.

The broker I am using is RabbitMQ and the management plugin is already enabled for the broker by the command: rabbitmq-plugins enable rabbitmq_management

Why am I getting the Stream closed error for the broker page?

Associated github issue: https://github.com/mher/flower/issues/830

Dishwater answered 10/8, 2018 at 11:34 Comment(1)
In Celery 5.4.0 (and probably in earlier versions too) you have to provide the --broker argument before flower. Otherwise you get the warning "No hostname was supplied. Reverting to default 'localhost'"Dachi
D
9

In the broker_api URL, you use 5672 port, but RabbitMQ management API usually listens on different port, 15672 (see the documentation). Also, the user you use has to be granted management permission (see docs)

Dolley answered 22/2, 2019 at 8:27 Comment(0)
S
0

In the RabbitMQ management web-page - you should look at the user rights. It's important that the user flower is using has access to "Virtual hosts".

Scandent answered 12/8, 2018 at 15:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.