Connection Error Socket Closed Celery
Contents |
here for a quick overview of the site Help Center Detailed answers to any cannot connect to amqp connection refused questions you might have Meta Discuss the workings and policies
Celery Errno 111 Connection Refused
of this site About Us Learn more about Stack Overflow the company Business Learn more about consumer cannot connect to amqp guest * * 127.0 0.1 5672 hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Celery Rabbitmq Connection Refused
Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Allowing RabbitMQ-Server Connections up vote 9 down vote favorite 2 I'm trying to get a Django Celery worker to connect to a RabbitMQ server, all running on the same celery errno 104 connection reset by peer host. However, when I run manage.py celery worker all I get is: [2013-06-11 17:33:41,185: WARNING/MainProcess] celery@localhost has started. [2013-06-11 17:33:44,192: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 2 seconds... [2013-06-11 17:33:50,203: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 4 seconds... [2013-06-11 17:34:03,214: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 6 seconds... [2013-06-11 17:34:27,232: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 8 seconds... When I inspect my /var/log/rabbitmq/rabbit@localhost.log I see several messages like: =ERROR REPORT==== 11-Jun-2013::17:33:44 === exception on TCP connection <0.201.0> from 127.0.0.1:43461 {channel0_error,opening, {amqp_error,access_refused, "access to vhost 'myapp' refused for user 'guest'", 'connection.open'}} I'm using the standard package out of Ubuntu 12.04's repo, with the default settings and my django-celery settings look like: BROKER_HOST = "localhost" BROKER_PORT = 5672 BROKER_USER = "guest" BROKER_PASSWORD = "guest" BROKER_VHOST = "myapp" Why is RabbitMQ refusing connections? django rabbitmq celery share|improve this question asked Jun 11 '13 at 2
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and
Amqp://guest:guest@localhost:5672/
policies of this site About Us Learn more about Stack Overflow the
Amqplain Login Refused: User 'guest' - Invalid Credentials
company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags access to vhost refused for user Users 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 http://stackoverflow.com/questions/17054533/allowing-rabbitmq-server-connections a 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 http://stackoverflow.com/questions/10610991/consumer-connection-error-with-django-and-celeryrabbitmq that 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 [Tas
from GoogleSign inHidden fieldsSearch for groups or messages
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 New issue Celery worker won't reconnect to broker #1290 Closed dn0 opened this Issue Apr 6, 2013 · 6 comments Projects None yet Labels Status: Feedback Needed Milestone No milestone Assignees No one assigned 2 participants dn0 commented Apr 6, 2013 A celery worker was stuck in an endless loop when trying to reconnect to broker. The log file got flooded with: [2013-04-06 15:26:37,516: ERROR/MainProcess] consumer: Connection to broker lost. Trying to re-establish the connection... Traceback (most recent call last): File "/opt/myproject/envs/lib/python2.7/site-packages/celery/worker/consumer.py", line 393, in start self.consume_messages() File "/opt/myproject/envs/lib/python2.7/site-packages/celery/worker/consumer.py", line 456, in consume_messages poll_timeout = (fire_timers(propagate=errors) if scheduled File "/opt/myproject/envs/lib/python2.7/site-packages/celery/worker/hub.py", line 157, in fire_timers entry() File "/opt/myproject/envs/lib/python2.7/site-packages/celery/utils/timer2.py", line 59, in __call__ return self.fun(*self.args, **self.kwargs) File "/opt/myproject/envs/lib/python2.7/site-packages/celery/utils/timer2.py", line 164, in _reschedules return fun(*args, **kwargs) File "/opt/myproject/envs/lib/python2.7/site-packages/kombu/connection.py", line 268, in heartbeat_check return self.transport.heartbeat_check(self.connection, rate=rate) File "/opt/myproject/envs/lib/python2.7/site-packages/kombu/transport/pyamqp.py", line 134, in heartbeat_check return connection.heartbeat_tick(rate=rate) File "/opt/myproject/envs/lib/python2.7/site-packages/amqp/connection.py", line 844, in heartbeat_tick raise ConnectionError('Too many heartbeats missed') ConnectionError: Too many heartbeats missed [2013-04-06 15:26:37,762: INFO/MainProcess] consumer: Connected to amqp://myproject@192.168.60.10:5672/myproject. [2013-04-06 15:26:37,774: ERROR/MainProcess] consumer: Connection to broker lost. Trying to re-establish the connection... Traceback (most recent call last): File "/opt/myproject/envs/lib/python2.7/site-packages/celery/worker/consumer.py", line 393, in start self.consume_messages() File "/opt/myproject/envs/lib/python2.7/site-packages/celery/worker/consumer.py", line 470, in consume_messages events = poll(poll_timeout) File "/opt/myproject/envs/lib/python2.7/site-packag