problem installing rabitmq-server in Ubuntu 20.04 python 3.810

74 views
Skip to first unread message

Annette Planells

unread,
Jan 31, 2022, 3:11:31 PM1/31/22
to rabbitmq-users
I am trying to install rabitmq-server for the first time but I havent been able to connect to the server.
I downloaded a very simple program but its not connecting to the rabbitmq
Program tasks.py


from celery import Celery
from time import sleep

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


@app.task
def reverse(text):
    sleep(5)
    return text[::-1]


When i run: celery -A tasks worker --loglevel=info

-------------- celery@DESKTOP-PA9QLQH v5.2.3 (dawn-chorus)
--- ***** -----
-- ******* ---- Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.29 2022-01-31 15:02:49
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app:         tasks:0x7f0e54d55a90
- ** ---------- .> transport:   amqp://guest:**@localhost:5672//
- ** ---------- .> results:     disabled://
- *** --- * --- .> concurrency: 8 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
 -------------- [queues]
                .> celery           exchange=celery(direct) key=celery


[tasks]
  . tasks.reverse

[2022-01-31 15:02:50,038: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: Server unexpectedly closed connection.
Trying again in 2.00 seconds... (1/100)

[2022-01-31 15:02:52,042: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: Server unexpectedly closed connection.
Trying again in 4.00 seconds... (2/100)


I can access the rabbitmq-server from localhost:15672

I had tried all that i can find from stackoverflow, but nothing seems to help

I would appretiate the help
Reply all
Reply to author
Forward
0 new messages