【发布时间】:2018-01-22 10:41:14
【问题描述】:
我不断收到此错误,我不知道为什么。我在 Windows 10 上使用 Ubuntu,而 celery 过去可以正常工作。然后发生了一些事情,我不断收到这个错误。我使用 celery docs 来学习。
这里是task.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
【问题讨论】:
标签: python windows ubuntu celery