Django Celery - Cannot connect to amqp://guest@127.0.0.8000:5672// Django Celery - Cannot connect to amqp://guest@127.0.0.8000:5672// django django

Django Celery - Cannot connect to amqp://guest@127.0.0.8000:5672//


The problem is that you are trying to connect to a local instance of RabbitMQ. Look at this line in your settings.py

BROKER_URL = 'amqp://guest:guest@localhost:5672/'

If you are working currently on development, you could avoid setting up Rabbit and all the mess around it, and just use a development version of a message queue with the Django database.

Do this by replacing your previous configuration with:

BROKER_URL = 'django://'

...and add this app:

INSTALLED_APPS += ('kombu.transport.django', )

Finally, launch the worker with:

./manage.py celery worker --loglevel=info

Source: http://docs.celeryproject.org/en/latest/getting-started/brokers/django.html


I got this error because rabbitmq was not started. If you installed rabbitmq via brew you can start it using brew services start rabbitmq


you can add these lines to your settings.py :

CELERY_BROKER_URL = 'redis://localhost:6379'CELERY_RESULT_BACKEND = 'redis://localhost:6379'

and run :

celery -A yourProjectName worker -l info