-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError when retrying tasks on 3.1.11 #1997
Comments
Thanks! Can you modify the retry method to reraise the original exception instead? Hard to see what's going on without the original traceback, but I guess this could be coming from the Redis transport implementation of But also, note that retry raising |
While trying to recreate the issue I've come across the same error message while calling "apply_async". I know that deviates a bit from the initial error report, but I think the issues are, if anything, closely related. Here's the stack trace: >>> from pipes.tasks.backoffice import TestTaskWhichFails
>>> TestTaskWhichFails().apply_async()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/celery-3.1.11-py2.7.egg/celery/app/task.py", line 555, in apply_async
**dict(self._get_exec_options(), **options)
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/celery-3.1.11-py2.7.egg/celery/app/base.py", line 351, in send_task
reply_to=reply_to or self.oid, **options
File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/celery-3.1.11-py2.7.egg/celery/app/base.py", line 408, in producer_or_acquire
yield producer
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/messaging.py", line 224, in __exit__
self.release()
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/connection.py", line 907, in release
self.release(R)
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/pools.py", line 73, in release
resource.__connection__.release()
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/connection.py", line 907, in release
self.release(R)
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/connection.py", line 934, in release
self.close_resource(resource)
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/connection.py", line 1016, in close_resource
resource._close()
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/connection.py", line 302, in _close
self._do_close_self()
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/connection.py", line 292, in _do_close_self
self.maybe_close_channel(self._default_channel)
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/connection.py", line 284, in maybe_close_channel
channel.close()
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/transport/redis.py", line 735, in close
self._pool.disconnect()
File "build/bdist.linux-x86_64/egg/redis/connection.py", line 478, in disconnect
connection.disconnect()
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/transport/redis.py", line 800, in disconnect
channel._on_connection_disconnect(self)
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/transport/redis.py", line 461, in _on_connection_disconnect
self.connection.cycle._on_connection_disconnect(connection)
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/transport/redis.py", line 259, in _on_connection_disconnect
self.poller.unregister(connection._sock)
File "/home/stegmann/.virtualenvs/celery1997/local/lib/python2.7/site-packages/kombu-3.0.15-py2.7.egg/kombu/utils/eventio.py", line 85, in unregister
self._epoll.unregister(fd)
TypeError: argument must be an int, or have a fileno() method. |
I sometime get this error too (after calling an async celery task :() And still haven't found the reason. Version 3.1.10 |
Have you tried to clear the redis queues? In my case, deleting all celery* keys in the redis db did the trick. |
You mean "celery purge"? |
Could it be related to the fact that Redis timeout's value is 0? |
Probably related to celery/kombu#342? Could you try that patch and report back and I can release a bugfix version of kombu. |
Good news, this issue does not appear any more for us. I tried it out with Celery 3.1.11 + Kombu from its master branch. Neither of the cases I reported (retrying, starting) throw this any more. Thanks! |
Fixed in kombu 3.0.16 on PyPI now! |
Hi,
we're running Celery 3.1.11 with Redis 2.8.6 as the broker. Python 2.7.3 on Amazon Ubuntu 12.04.4 machines.
When retrying tasks, we get the following error:
We retry tasks with the following call:
Reverting back to 3.1.10 corrects this issue.
Celery project output:
The project report output is the following:
The text was updated successfully, but these errors were encountered: