Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see broker information when using Flower?

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

like image 979
Vikas Prasad Avatar asked Aug 10 '18 11:08

Vikas Prasad


People also ask

What is MHER flower?

branch=master :target: https://travis-ci.org/mher/flower. Flower is a web based tool for monitoring and administrating Celery clusters.

What is celery broker?

The broker is the third-person facilitator between a buyer and a seller. Celery requires a solution to send and receive messages; usually, this comes in the form of a separate service called a message broker. In celery, the broker is Redis, RabbitMQ, etc who conveying the message between a client and celery.

How do you start a celery flower?

Celery Flower in Docker Let's add our flower service here. This instructs docker compose to run our flower on port 9090 and open the port for us to access it. Run this command to start your project. When all services are up you can open http://127.0.0.1:9090/ and see celery flower interface.


1 Answers

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)

like image 71
Tomáš Linhart Avatar answered Sep 24 '22 02:09

Tomáš Linhart