I\'ve been running a flask application with a celery worker and redis in three separated docker containers without any issue.
This is how I start it:
cele
The problem was that the my celery container downloaded a new release of the redis package with pip at build time, eventually with a bug or a serious change that crashes when celery tries to use it when connecting to redis. This new redis library is the 3.0.0 and it was released today.
To fix the issue you have to specify the previous version in the requirements.txt (which is 2.10.6).
And actually, specifying package versions in the requirements.txt is a good practice that prevents this type of problems.
I ran into this same issue today. hopefully this gets resolved shortly in an update by Celery. I reverted back to a previous version as well.
Not enough rep yet for a comment:
This issue is tracked by the celery folks in: https://github.com/celery/celery/issues/5175
Leading to this PR: https://github.com/celery/celery/pull/5176
Which has been merged and reverted. Because some other fix landed. I'm not sure if this fixed it. It is no longer relevant for me.
For anyone who use the docker-airflow, I used the folk of puckel/docker-airflow Just need to modify the dockerfile by adding
&& pip install 'redis>=2.10.5,<3'\
replace celery[redis]
with only celery
, by adding celery in apache-airflow built-in module i.e.,
&& pip install apache-airflow[crypto,celery,postgres,hive,jdbc,mysql]==$AIRFLOW_VERSION
Update: They also change the docker-airflow dockerfile recently to fix this bug, see here