-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Celery worker aborts without any message #8310
Comments
Hey @jrief 👋, We also offer priority support for our sponsors. |
should we restrict that version of redis in next point release? |
I should have mentioned redis-py. A hint on this would be useful, it took me almost a day to find the culprit. As I said, on a this only happens in K8S using Sentinel, not in a plain old Docker container. |
are you OK with #8317? |
What in redis is causing this crash? Is there an open issue on redis-py which can help? |
I'm sorry. I have no expertise to debug this. What I've seen from their ChangeLog, is that in version 4.5.5 a lot has changed. |
This is because in my system with the following dependencies I am not experiencing any problem with the workers (but I am not yet using sentinel)
Maybe there was a change in the 5.3 series of celery/kombu which caused this issue? Do you have any DEBUG level logs regarding those crash you experienced? |
Found the problem: celery.worker - start - CRITICAL - Unrecoverable error: TypeError("SentinelManagedConnection.read_response() got an unexpected keyword argument 'disconnect_on_error'")
Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/celery/worker/worker.py", line 203, in start
self.blueprint.start(self)
File "/opt/venv/lib/python3.10/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
File "/opt/venv/lib/python3.10/site-packages/celery/bootsteps.py", line 365, in start
return self.obj.start()
File "/opt/venv/lib/python3.10/site-packages/celery/worker/consumer/consumer.py", line 332, in start
blueprint.start(self)
File "/opt/venv/lib/python3.10/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
File "/opt/venv/lib/python3.10/site-packages/celery/worker/consumer/consumer.py", line 628, in start
c.loop(*c.loop_args())
File "/opt/venv/lib/python3.10/site-packages/celery/worker/loops.py", line 97, in asynloop
next(loop)
File "/opt/venv/lib/python3.10/site-packages/kombu/asynchronous/hub.py", line 373, in create_loop
cb(*cbargs)
File "/opt/venv/lib/python3.10/site-packages/kombu/transport/redis.py", line 1336, in on_readable
self.cycle.on_readable(fileno)
File "/opt/venv/lib/python3.10/site-packages/kombu/transport/redis.py", line 566, in on_readable
chan.handlers[type]()
File "/opt/venv/lib/python3.10/site-packages/kombu/transport/redis.py", line 910, in _receive
ret.append(self._receive_one(c))
File "/opt/venv/lib/python3.10/site-packages/kombu/transport/redis.py", line 920, in _receive_one
response = c.parse_response()
File "/opt/venv/lib/python3.10/site-packages/redis/client.py", line 1542, in parse_response
response = self._execute(conn, try_read)
File "/opt/venv/lib/python3.10/site-packages/redis/client.py", line 1518, in _execute
return conn.retry.call_with_retry(
File "/opt/venv/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "/opt/venv/lib/python3.10/site-packages/redis/client.py", line 1519, in <lambda>
lambda: command(*args, **kwargs),
File "/opt/venv/lib/python3.10/site-packages/redis/client.py", line 1540, in try_read
return conn.read_response(disconnect_on_error=False)
TypeError: SentinelManagedConnection.read_response() got an unexpected keyword argument 'disconnect_on_error' This was caused by redis/redis-py@c0833f6 which changed how internally redis-py handles connection, unfortunatelly the Sentinel wrapper was not updated to reflect that change (see The issue is fixed on the master branch in redis/redis-py@35b7e09 |
Checklist
main
branch of Celery.contribution guide
on reporting bugs.
for similar or identical bug reports.
for existing proposed fixes.
to find out if the bug was already fixed in the main branch.
in this issue (If there are none, check this box anyway).
Mandatory Debugging Information
celery -A proj report
in the issue.(if you are not able to do this, then at least specify the Celery
version affected).
main
branch of Celery.pip freeze
in the issue.to reproduce this bug.
Our setup is Celery with Redis over Sentinel in a Kubernetes cluster. After upgrading Redis from version 4.5.4 to 4.5.5 the Celery worker crashed without any message. Return code after crashing is 0.
The same image running on Docker-Swarm without Sentinel works flawlessly.
pip freeze gives (I removed irrelevant packages):
#8268 seems unrelated, because it has a different message.
The text was updated successfully, but these errors were encountered: