Celery gives connection reset by peer

celery, python

Solution

The problem was solved once I deployed my code to production, and upgrading the celery to 3.1.12. I inititally used 3.0.19 but later upgraded and did not find any issues. Thanks for the support.

Problem

I setup the rabbitmqserver and added the users using the following steps: ``` uruddarraju@*******:/usr/lib/rabbitmq/lib/rabbitmq_server-3.2.3$ sudo rabbitmqctl list_users Listing users ... guest [administrator] phantom [administrator] phantom1 [] sudo rabbitmqctl set_permissions -p phantom phantom1 ".*" ".*" ".*" uruddarraju@******:/usr/lib/rabbitmq/lib/rabbitmq_server-3.2.3$ sudo netstat -tulpn | grep :5672 tcp6 0 0 :::5672 :::* LISTEN 31341/beam.smp ``` My celery config is like: ``` BROKER_URL = 'amqp://phantom:phantom1@10.98.85.92/phantom' ``` My code is like: ``` __author__ = 'uruddarraju' from celery import Celery import time import celeryconfig app = Celery('tasks') app.config_from_object(celeryconfig) @app.task def add(x, y): print 'sleeping' time.sleep(20) print 'awoke' return x + y ``` When I try to run ``` celery -A celery worker --loglevel=info ``` I get ``` [2014-07-08 23:30:05,028: ERROR/MainProcess] consumer: Cannot connect to amqp://phantom:**@10.98.85.92:5672/phantom: [Errno 54] Connection reset by peer. Trying again in 2.00 seconds... [2014-07-08 23:30:07,101: ERROR/MainProcess] consumer: Cannot connect to amqp://phantom:**@10.98.85.92:5672/phantom: [Errno 54] Connection reset by peer. Trying again in 4.00 seconds... ``` Everything looks just perfect !! Can someone help me what I am missing here ?

Original source