首页 / REDIS / 使用redis作为调度中心的celery时启动多个queue,报错Probably the key ('_kombu.binding.reply.celery.pidbox') has been removed from the Redis database
使用redis作为调度中心的celery时启动多个queue,报错Probably the key ('_kombu.binding.reply.celery.pidbox') has been removed from the Redis database
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了使用redis作为调度中心的celery时启动多个queue,报错Probably the key ('_kombu.binding.reply.celery.pidbox') has been removed from the Redis database,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4778字,纯文字阅读大概需要7分钟。
内容图文
我今天在使用celery启动多个queue时遇到一个问题,当启动第二个queue是,第一个启动的queue日志报了下面一段错误
[2019-12-16 14:40:25,736: ERROR/MainProcess] Control command error: OperationalError("\nCannot route message for exchange ‘reply.celery.pidbox‘: Table empty or key no longer exists.\nProbably the key (‘_kombu.binding.reply.celery.pidbox‘) has been removed from the Redis database.\n") Traceback (most recent call last): File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/connection.py", line 439, in _reraise_as_library_errors yield File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/connection.py", line 518, in _ensured return fun(*args, **kwargs) File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/messaging.py", line 203, in _publish mandatory=mandatory, immediate=immediate, File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/transport/virtual/base.py", line 605, in basic_publish message, exchange, routing_key, **kwargs File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/transport/virtual/exchange.py", line 70, in deliver for queue in _lookup(exchange, routing_key): File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/transport/redis.py", line 877, in _lookup exchange, redis_key)) kombu.exceptions.InconsistencyError: Cannot route message for exchange ‘reply.celery.pidbox‘: Table empty or key no longer exists. Probably the key (‘_kombu.binding.reply.celery.pidbox‘) has been removed from the Redis database. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/celery/worker/pidbox.py", line 46, in on_message self.node.handle_message(body, message) File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/pidbox.py", line 145, in handle_message return self.dispatch(**body) File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/pidbox.py", line 115, in dispatch ticket=ticket) File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/pidbox.py", line 151, in reply serializer=self.mailbox.serializer) File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/pidbox.py", line 285, in _publish_reply **opts File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/messaging.py", line 181, in publish exchange_name, declare, File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/connection.py", line 551, in _ensured errback and errback(exc, 0) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in__exit__ self.gen.throw(type, value, traceback) File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/connection.py", line 444, in _reraise_as_library_errors sys.exc_info()[2]) File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/vine/five.py", line 194, in reraise raise value.with_traceback(tb) File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/connection.py", line 439, in _reraise_as_library_errors yield File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/connection.py", line 518, in _ensured return fun(*args, **kwargs) File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/messaging.py", line 203, in _publish mandatory=mandatory, immediate=immediate, File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/transport/virtual/base.py", line 605, in basic_publish message, exchange, routing_key, **kwargs File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/transport/virtual/exchange.py", line 70, in deliver for queue in _lookup(exchange, routing_key): File "/Users/asher/PycharmProjects/ops_release/venv/lib/python3.7/site-packages/kombu/transport/redis.py", line 877, in _lookup exchange, redis_key)) kombu.exceptions.OperationalError: Cannot route message for exchange ‘reply.celery.pidbox‘: Table empty or key no longer exists. Probably the key (‘_kombu.binding.reply.celery.pidbox‘) has been removed from the Redis database.
经过多方查找,发现这个问题是kombu组件的一个bug,查了一下当前kombu版本发现版本是4.6.5,将版本回退到4.6.4,再启动这个问题就解决了,据说有人需要将版本降到4.6.3,但是我这边不用
原文:https://www.cnblogs.com/gangdou/p/12069660.html
内容总结
以上是互联网集市为您收集整理的使用redis作为调度中心的celery时启动多个queue,报错Probably the key ('_kombu.binding.reply.celery.pidbox') has been removed from the Redis database全部内容,希望文章能够帮你解决使用redis作为调度中心的celery时启动多个queue,报错Probably the key ('_kombu.binding.reply.celery.pidbox') has been removed from the Redis database所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。