Closed boojum closed 5 years ago
Hi,
What version of Celery are you using?
As per requirements.txt
from this repo - celery==4.1.*
. Steps to reproduce:
git clone https://github.com/nickjj/build-a-saas-app-with-flask
cd build-a-saas-app-with-flask
docker-compose up --build
...snip...
celery_1 | [2019-03-26 22:37:09,620: CRITICAL/MainProcess] Unrecoverable error: VersionMismatch(u'Redis transport requires redis-py versions 3.2.0 or later. You have 2.10.6',)
celery_1 | Traceback (most recent call last):
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/worker.py", line 205, in start
celery_1 | self.blueprint.start(self)
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
celery_1 | step.start(parent)
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/bootsteps.py", line 370, in start
celery_1 | return self.obj.start()
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 316, in start
celery_1 | blueprint.start(self)
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
celery_1 | step.start(parent)
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/connection.py", line 23, in start
celery_1 | c.connection = c.connect()
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 403, in connect
celery_1 | conn = self.connection_for_read(heartbeat=self.amqheartbeat)
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 410, in connection_for_read
celery_1 | self.app.connection_for_read(heartbeat=heartbeat))
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 434, in ensure_connected
celery_1 | callback=maybe_shutdown,
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 422, in ensure_connection
celery_1 | callback, timeout=timeout)
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/utils/functional.py", line 341, in retry_over_time
celery_1 | return fun(*args, **kwargs)
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 275, in connect
celery_1 | return self.connection
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 823, in connection
celery_1 | self._connection = self._establish_connection()
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 778, in _establish_connection
celery_1 | conn = self.transport.establish_connection()
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/transport/virtual/base.py", line 941, in establish_connection
celery_1 | self._avail_channels.append(self.create_channel(self))
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/transport/virtual/base.py", line 923, in create_channel
celery_1 | channel = self.Channel(connection)
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/transport/redis.py", line 495, in __init__
celery_1 | self.Client = self._get_client()
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/transport/redis.py", line 956, in _get_client
celery_1 | 'You have {0.__version__}'.format(redis))
celery_1 | VersionMismatch: Redis transport requires redis-py versions 3.2.0 or later. You have 2.10.6
celery_1 | [2019-03-26 22:37:09,626: INFO/MainProcess] beat: Shutting down...
snakeeyes_celery_1 exited with code 1
Thanks for bringing this up.
This was fixed in the full version of the course a long time ago, but didn't make its way back to this repo.
I just pushed the fix here.
When trying to build the app redis is complaining version mismatch:
Fix is to update the
requirements.txt
toredis==3.2.*