Celery: consumer: cannot connect to amqp: // guest: **@127.0.0.1: 5672 //: [Errno 92] Protocol not available

I keep getting this error and I don't know why. I use Ubuntu on Windows 10 and celery works fine. Then something happened and I keep getting this error. I use celery docs to find out.

Here is task.py:

from celery import Celery

app = Celery('tasks', broker='pyamqp://guest@localhost//')

@app.task
def add(x, y):
    return x + y

Here is the error I get:

[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...

To start celery I, type:

celery -A tasks worker --loglevel=info
+4
source share
1 answer

Have you recently updated amqp?

It seems that connecting to the RabbitMQ instance from the Linux subsystem is no longer possible, since versions starting from version 2.1.2 up to the wotchery socket.

https://github.com/celery/py-amqp/issues/145

, , redis. , , RabbitMQ 2.1.2, .

+1

Source: https://habr.com/ru/post/1683689/


All Articles