10

I'm running celery and celery flower with redis as a broker. Everything boots up correctly, the worker can find jobs from redis, and the celery worker completes the jobs successfully.

The issue I'm having is the Broker tab in the celery flower web UI doesn't show any of the information from Redis. I know the Redis url is correct, because it's the same URL that celeryd is using. I also know that the celery queue has information in it, because I can manually confirm that via redis-cli.

I'm wondering if celery flower is trying to monitor a different queue in the Broker tab? I don't see any settings in the flower documentation to override or confirm. I'm happy to provide additional information upon request, but I'm not certain what is relevant.

Alex Bain
  • 801
  • 7
  • 12

4 Answers4

18

Turns out I needed to start Celery Flower with both the broker and broker_api command line arguments:

celery flower --broker=redis://localhost:6379/0 --broker_api=redis://localhost:6379/0

Hope this helps someone else.

Alex Bain
  • 801
  • 7
  • 12
  • 1
    what if you are using aqmp? I am already defining it in teh `--broker` option. do i need to input the exact same for the `--broker_api` option? – user299709 Jul 27 '14 at 10:11
  • This has to be a new requirement. I have another website where I do not have to pass broker_api wtih redis. And their docs seem to give the impression this is AMQP only: http://flower.readthedocs.org/en/latest/config.html?highlight=broker_api#broker-api – wes Jul 02 '15 at 19:19
5

For AMQP this is an example.

/usr/bin/celery -A app_name --broker=amqp://user:pw@host//vhost --broker_api=http://user:pw@host:host_port/api flower

The broker_api is the rabbitmq web ui endpoint with /api

f01
  • 1,738
  • 1
  • 18
  • 21
  • 1
    `--broker_api=http://guest:guest@localhost:15672/api/` worked for me for the version 3.6.9-1. – bitnik Apr 13 '17 at 09:57
  • 1
    [This related question](https://stackoverflow.com/questions/22628492) might be useful for those using a Docker network and/or Airflow – swimmer Sep 06 '22 at 12:26
1
rabbitmq-plugins enable rabbitmq_management

that was help me from http://flower.readthedocs.org/en/latest/config.html?highlight=broker_api#broker-api

mixo
  • 309
  • 3
  • 10
0

Faced the same issue with RabbitMQ. Here is how I have it works:

  rabbitmq:
    image: rabbitmq:3-management

  flower:
    image: mher/flower
    ports:
      - 5555:5555
    command:
      - "celery"
      - "--broker=amqp://guest@rabbitmq:5672//"
      - "flower"
      - "--broker_api=http://guest:guest@rabbitmq:15672/api//"
    depends_on:
      - rabbitmq

Brokers & other tabs will show up.