Hello everyone, I am getting the following exception from within kombu while starting a celery worker using redis as a transport:
celery -A dnsalloc worker -l info -E
-------------- celery@picard v4.0.0 (latentcall)
---- **** -----
--- * *** * -- Linux-3.16.0-4-amd64-x86_64-with-debian-8.5 2016-11-14 15:41:39
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: dnsalloc:0x7f2bce596c10
- ** ---------- .> transport: redis://localhost:6379/2
- ** ---------- .> results: redis://localhost:6379/2
- *** --- * --- .> concurrency: 2 (prefork)
-- ******* ---- .> task events: ON
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[tasks]
. dnsalloc.apps.dnsalloc.tasks.task_query_service
. dnsalloc.apps.dnsalloc.tasks.task_save_service
. dnsalloc.apps.dnsalloc.tasks.task_start_worker
. dnsalloc.apps.dnsalloc.tasks.task_update_service
[2016-11-14 15:41:41,117: CRITICAL/MainProcess] Unrecoverable error: TypeError("can_read() got an unexpected keyword argument 'timeout'",)
Traceback (most recent call last):
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/celery/worker/worker.py", line 203, in start
self.blueprint.start(self)
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/celery/bootsteps.py", line 370, in start
return self.obj.start()
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 318, in start
blueprint.start(self)
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 584, in start
c.loop(*c.loop_args())
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/celery/worker/loops.py", line 88, in asynloop
next(loop)
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/kombu/async/hub.py", line 345, in create_loop
cb(*cbargs)
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/kombu/transport/redis.py", line 1038, in on_readable
self.cycle.on_readable(fileno)
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/kombu/transport/redis.py", line 337, in on_readable
chan.handlers[type]()
File "/var/local/pyweb/virtualenv/dnsalloc/local/lib/python2.7/site-packages/kombu/transport/redis.py", line 670, in _receive
while c.connection.can_read(timeout=0):
TypeError: can_read() got an unexpected keyword argument 'timeout'
Please take a look, thanks.
Upgrading from redis-2.10.3 to redis-2.10.5 solved the issue for me. Since redis 2.10.5 is required by the celery[redis] bundle I am closing this issue.
Just a note for future people who run into this issue:
The upgrade from redis-2.10.3 to redis-2.10.5 is the redis client package from pip. Running pip install celery[redis] should fix it for you.
I am getting the same error, and I am using Redis 3.0.6 with celery[redis]==4.0.2.. I dont get it
I thought it was redis-server version.. pip install redis==2.10.5 fixed my issue.
Most helpful comment
Just a note for future people who run into this issue:
The upgrade from
redis-2.10.3toredis-2.10.5is the redis client package from pip. Runningpip install celery[redis]should fix it for you.