I have a docked setup with a Django application in which I use Celery tasks. Celery uses Redis as a broker.
Versioning:
- Dock version 17.09.0-ce, build afdb6d4
- docker-compose version 1.15.0, build e12f3b9
- Django == 1.9.6
- Django-celery-bit == 1.0.1
- celery == 4.1.0
- celery [Redis]
- Redis == 2.10.5
Problem:
My celery workers seem to be unable to connect to the redis container located on the local host: 6379. I can connect to the redis server on the specified port. I can verify that redis-server is running in the container.
When I manually connect to an instance of the Celery docker and try to create a worker using the celery -A backend worker -l info , I get a notification:
[2017-11-13 18:07:50,937: ERROR/MainProcess] consumer: Cannot connect to redis://localhost:6379/0: Error 99 connecting to localhost:6379. Cannot assign requested address.. Trying again in 4.00 seconds...
Notes:
I can connect telnet to the redis container on port 6379. In the redis container, redis-server is running.
Is there anything else I'm missing? I walked quite far down the rabbit hole, but I feel that I am missing something very simple.
DOCKER CONFIGURATION FILES:
docker-compose.common.yml here
docker-compose.dev.yml here
user1026996
source share