Reputation: 11523
I'm new to celery, I followed the django / celery tutorial. I'm using rabbitmq. I have a simple function that uses celery:
from celery.decorators import task
@task
def test_celery(x, y):
print x + y
return None
When I run it with delay
it doesn't work, it gives me a "connection reset by peer":
test_celery.delay("one ", "dos")
I'm running rabbitmq in another terminal, if I do
sudo rabbitmqctl list_users
I get
alejoss []
guest [administrator]
my BROKER_URL
looks like this:
BROKER_URL = "amqp://alejoss:password@localhost://"
What am I missing. I'm new to Celery... please help.
Upvotes: 0
Views: 2391
Reputation: 1194
Based on your debugging feedback, I think you have an authentication issue with the user you setup for yourself. You may want to read-up more on access control here (https://www.rabbitmq.com/access-control.html).
Sounds like it could be a permissions issue.
Here's the spoiler for you in case the documentation is too confusing at first :)
sudo rabbitmqctl set_permissions -p alejoss / ".*" ".*" ".*"
The RabbitMQ gotcha here for newcomers is that newly created users by default have NO permissions.
Upvotes: 1