Consumer Connection Error Celery
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and celery rabbitmq connection reset by peer policies of this site About Us Learn more about Stack Overflow the company rabbitmq errno 104 connection reset by peer Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users consumer cannot connect to amqp Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a celery_result_backend minute: Sign up Consumer Connection error with django and celery+rabbitmq? up vote 9 down vote favorite 1 I'm trying to set up celeryd with django and rabbit-mq. So far, I've done the following: Installed celery from pip Installed rabbitmq via the debs available from their repository Added a user and vhost to rabbitmq via rabbitmqctl, as well as permissions for that
Rabbitmq Default Port
user Started the rabbitmq-server Installed django-celery via pip Set up django-celery, including its tables Configured the various things in settings.py (BROKER_HOST, BROKER_PORT, BROKER_USER, BROKER_PASSWORD, BROKER_VHOST, as well as importing djecelery, calling the setup function and adding it to the INSTALLED APPS). I've double checked and all of these values are correct (at least, user, password and vhost are correct). So now, when I run python manage.py celeryd -l info I get connection errors (see below). Anyone have any idea why? $ python manage.py celeryd -l info /usr/local/lib/python2.7/dist-packages/djcelery/loaders.py:108: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments! warnings.warn("Using settings.DEBUG leads to a memory leak, never " [2012-05-15 18:38:04,486: WARNING/MainProcess] -------------- celery@ubuntu v2.5.3 ---- **** ----- --- * *** * -- [Configuration] -- * - **** --- . broker: amqp://celeryuser@localhost:5672/celeryhost - ** ---------- . loader: djcelery.loaders.DjangoLoader - ** ---------- . logfile: [stderr]@INFO - ** ---------- . concurrency: 1 - ** ---------- . events: OFF - *** --- * --- . beat: OFF -- ******* ---- --- ***** ----- [Queues] -------------- . celery: exchange:celery (direct) binding:celery [Tasks] [2012-05-15 18:38:04,562: IN
Support Search GitHub This repository Watch 304 Star 5,357 Fork 1,764 celery/celery Code Issues 152 Pull requests 20 Projects 0 Wiki Pulse Graphs
run celeryd from a Django application: [user@web]$ python2.7 manage.py celeryd --loglevel=info [2012-06-18 19:59:48,352: WARNING/MainProcess] [2012-06-18 19:59:48,432: INFO/PoolWorker-1] child process calling self.run() [2012-06-18 19:59:48,435: WARNING/MainProcess] celery@web184.webfaction.com has started. https://community.webfaction.com/questions/9460/connection-problem-between-celery-and-rabbitmq [2012-06-18 19:59:51,489: ERROR/MainProcess] Consumer: Connection Error: [Errno 111] Connection refused. Trying again http://docs.celeryproject.org/en/latest/reference/celery.worker.consumer.html in 2 seconds... [2012-06-18 19:59:56,490: ERROR/MainProcess] Consumer: Connection Error: [Errno 111] Connection refused. Trying again in 4 seconds... I have RabbitMQ installed and configured (I think) properly: Custom apps listen on port Exported environment variables: ERL_EPMD_PORT=custom epmd port number, RABBITMQ_NODE_PORT=custom rabbitmq port number, ERL_INETRC=$HOME/.erl_inetrc When checking the status with connection reset "rabbitmqctl status" i got that is ok. Also, on settings.py I have the values: BROKER_HOST = "Web1xx" BROKER_PORT = custom port number for rabbitmq BROKER_USER = "guest" BROKER_PASSWORD = "guest" BROKER_VHOST = "/" Any idea about my [Errno 111]? celery rabbitmq asked 18 Jun '12, 19:01 8ksoft 5●1●4 accept rate: 0% One Answer: active answersoldest answersnewest answerspopular answers 0 I notice it connection reset by says 'celery@web184.webfaction.com' for the host information. Try changing the host from 'web184.webfaction.com' to 'localhost'. It is possible it is trying external routing because of the URL, which would have the port blocked. The port is only open for localhost, unless we open it upon request. permanent link answered 18 Jun '12, 21:33 johns ♦♦ 4.6k●2●9 accept rate: 23% Thanks, johns! Changing the host to 'localhost' makes celeryd is running now! (19 Jun '12, 08:53) 8ksoft Your answer toggle preview community wiki: Follow this questionBy Email:Once you sign in you will be able to subscribe for any updates hereBy RSS: Answers Answers and Comments Markdown Basics *italic* or _italic_ **bold** or __bold__ link:[text](http://url.com/ "title") image?![alt text](/path/img.jpg "title") numbered list: 1. Foo 2. Bar to add a line break simply add two spaces to where you would like the new line to be. basic HTML tags are also supported learn more about Markdown Question tags: celery ×21 rabbitmq ×11 question asked: 18 Jun '12, 19:01 question was seen: 2,925 times last updated: 19 Jun '12, 08:53 Related questions RabbitMQ + Django + Celery django+celery
This module contains the components responsible for consuming messages from the broker, processing the messages and keeping the broker connections up and running. class celery.worker.consumer.Consumer(on_task_request, init_callback=