celery icon indicating copy to clipboard operation
celery copied to clipboard

Documentation issue: BROKER_URL !== CELERY_BROKER_URL

Open chris-hydra opened this issue 10 years ago • 1 comments

Thanks for all the great work on Celery - cross-posting this in case anyone else has this issue using Celery in Docker.

The documentation doesn't make it clear that BROKER_URL is deprecated in favour of CELERY_BROKER_URL.

The configuration documentation makes no mention of CELERY_BROKER_URL - all examples use BROKER_URL.

If you use the official Celery image in a docker-compose setup and rename your RabbitMQ service to anything but "rabbit" in your docker-compose.yml, and try (according to the configuration docs) to set BROKER_URL accordingly, this image won't work.

For example, this docker-compose file won't work:

foo:
  image: rabbitmq:3
  expose:
    - "5672"

celery:
  image: celery:3.1
  environment:
    - BROKER_URL=amqp://guest:guest@foo//
  links:
    - foo

[ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672//: [Errno -2] Name or service not known.

This works:

foo:
  image: rabbitmq:3
  expose:
    - "5672"

celery:
  image: celery:3.1
  environment:
    - CELERY_BROKER_URL=amqp://guest:guest@foo//
  links:
    - foo

chris-hydra avatar Apr 27 '16 18:04 chris-hydra

This is an environment variable, not a configuration variable! I don't think these environment variables are documented anywhere, except for maybe in the changelog.

ask avatar Jun 28 '16 23:06 ask