作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我一直收到这个错误,我不知道为什么。我在 Windows 10 上使用 Ubuntu, celery 过去工作正常。然后发生了一些事情,我一直收到这个错误。我使用 celery 文档来学习。
这是任务.py:
from celery import Celery
app = Celery('tasks', broker='pyamqp://guest@localhost//')
@app.task
def add(x, y):
return x + y
这是我得到的错误:
[2017-08-14 17:34:04,436: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 92] Protocol not available.
Trying again in 2.00 seconds...
[2017-08-14 17:34:06,453: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 92] Protocol not available.
Trying again in 4.00 seconds...
[2017-08-14 17:34:10,465: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 92] Protocol not available.
Trying again in 6.00 seconds...
[2017-08-14 17:34:16,480: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 92] Protocol not available.
Trying again in 8.00 seconds...
为了启动 Celery,我输入:
celery -A tasks worker --loglevel=info
最佳答案
你最近有更新 amqp 吗?
似乎从 Linux 子系统连接到 RabbitMQ 实例是不可能的,因为 2.1.2 之后的版本由于套接字巫术。
https://github.com/celery/py-amqp/issues/145
我建议尝试 Celery 可能支持的其他后端,我将尝试 redis。至少降级到 RabbitMQ 2.1.2 也可能解决问题。
关于python - celery :消费者:无法连接到 amqp://guest:**@127.0.0.1:5672//:[Errno 92] 协议(protocol)不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45677111/
我正在开发一个 voip 调用应用程序。我需要做的是在接到来电时将 Activity 带到前台。我在应用程序中使用 Twilio,并在收到推送消息时开始调用。 问题是我试图在接到任何电话时显示 Act
我是一名优秀的程序员,十分优秀!