Celery Error/mainprocess Consumer Connection Error Socket Closed
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow
Cannot Connect To Amqp Connection Refused
the company Business Learn more about hiring developers or posting ads with us Stack consumer cannot connect to amqp guest * * 127.0 0.1 5672 Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of
Celery Errno 111 Connection Refused
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 celery rabbitmq connection refused to connect to a RabbitMQ server, all running on the same 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: amqp://guest:guest@localhost:5672// 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 21:56 Cerin 16.3k36138273 add a comment| 1 Answer 1 active oldest votes up vote 22 down vote accepted It looks like you need to grant access to the "/myapp" vhost for the "guest" user. From the docs: set_permissions [-p vhostpath] {user} {conf} {write} {read} So something similar to this will give your guest user unlimited access: rabbitmqctl set_permissions -p /myvhost guest ".*" ".*" ".*" share|improve this answer answered Jun 11 '13 at 22:06 Scott Woodall 4,77621627 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, y
Support Search GitHub This repository Watch
Celery [errno 104] Connection Reset By Peer
302 Star 5,349 Fork 1,764 celery/celery Code Issues 150 amqplain login refused: user 'guest' - invalid credentials Pull requests 19 Projects 0 Wiki Pulse Graphs New issue Celery: worker connection
Cannot Connect To Amqp Guest * * 127.0 0.1 5672 Errno 61 Connection Refused
timed out #2991 Closed shiraiyuki opened this Issue Jan 8, 2016 · 5 comments Projects None yet Labels Component: Eventlet Workers Pool http://stackoverflow.com/questions/17054533/allowing-rabbitmq-server-connections Milestone No milestone Assignees No one assigned 4 participants shiraiyuki commented Jan 8, 2016 I'm using amqp (1.4.6) , celery (3.1.14) and kombu (3.0.22). Recently, I create a worker in the internet connecting with rabbitmq-server(broker). Sometimes, worker get a [errno110] connection timed out error. https://github.com/celery/celery/issues/2991 The following is the worker's log: [2016-01-07 15:44:02,001: WARNING/MainProcess] Traceback (most recent call last): [2016-01-07 15:44:02,001: WARNING/MainProcess] File "../lib/python2.7/site-packages/eventlet/hubs/poll.py", line 115, in wait [2016-01-07 15:44:02,036: WARNING/MainProcess] listener.cb(fileno) [2016-01-07 15:44:02,036: WARNING/MainProcess] File "../lib/python2.7/site-packages/celery/worker/pidbox.py", line 112, in loop [2016-01-07 15:44:02,063: WARNING/MainProcess] connection.drain_events(timeout=1.0) [2016-01-07 15:44:02,063: WARNING/MainProcess] File "../lib/python2.7/site-packages/kombu/connection.py", line 275, in drain_events [2016-01-07 15:44:02,074: WARNING/MainProcess] return self.transport.drain_events(self.connection, **kwargs) [2016-01-07 15:44:02,075: WARNING/MainProcess] File "../lib/python2.7/site-packages/kombu/transport/pyamqp.py", line 91, in drain_events [2016-01-07 15:44:02,092: WARNING/MainProcess] return connection.drain_events(**kwargs) [2016-01-07 15:44:02,093: WARNING/MainProcess] File "../lib/python2.7/site-packages/amqp/connection.py", line 302, in drain_events [2016-01-07 15:44:02,107: WARNING/MainProcess] chanmap, None, timeout=timeout, [2016-01-07 15:44:02,107: WARNING/MainProcess] File "../lib/python2.7/site-packages/amqp/connection.py", line 365, in _wait_multiple [2016-01-07 15:44:02,107: WARNING/MainProcess] channel, method_sig, args, content = read_timeout(timeout) [2016-01-07 15:44:02,107: WARNING/MainProcess] File "../lib/python2.7/site-packages/amqp/connection.py", line 336, in read_timeout [2016-01-07 15:44:02,107: WARNING/MainProcess] return self.method_reader.read_method() [2016-01-07 15:44:02,107: WARNING/MainProcess] File "../lib/python2.7/site-packages/amqp/method_framing.py", line 189, in read_method [2016-01-07 15:44:02,108: WARNING/MainProcess] raise m
Support Search GitHub This repository Watch https://github.com/celery/celery/issues/1777 302 Star 5,349 Fork 1,764 celery/celery Code Issues 150 Pull requests 19 Projects 0 Wiki Pulse Graphs New issue Trying to re-establish https://forum.efa-project.org/viewtopic.php?t=102 the connection Failed #1777 Closed ant31 opened this Issue Jan 9, 2014 · 2 comments Projects None yet Labels None yet Milestone connection refused No milestone Assignees No one assigned 2 participants ant31 commented Jan 9, 2014 Hello, I'm having an issue when the connection to the broker (rabbitmq) is lost. As soon as celery find a new valid connection (failover or broker up again) it crash with this cannot connect to trace: 2014-01-09 11:13:32,203: ERROR/MainProcess] consumer: Cannot connect to amqp://guest@192.168.37.127:5672//: Error opening socket: Unknown error 536871023. Trying again in 2.00 seconds... [2014-01-09 11:13:44,257: ERROR/MainProcess] Unrecoverable error: ValueError('I/O operation on closed epoll fd',) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/celery/worker/init.py", line 206, in start self.blueprint.start(self) File "/usr/lib/python2.7/dist-packages/celery/bootsteps.py", line 123, in start step.start(parent) File "/usr/lib/python2.7/dist-packages/celery/bootsteps.py", line 373, in start return self.obj.start() File "/usr/lib/python2.7/dist-packages/celery/worker/consumer.py", line 270, in start blueprint.start(self) File "/usr/lib/python2.7/dist-packages/celery/bootsteps.py", line 123, in start step.start(parent) File "/usr/lib/python2.7/dist-packages/celery/worker/consumer.py", line 468, in start c.connection = c.connect() File "/usr/lib/python2.7/dist-packages/celery/worker/consumer.py", line 369, in connect conn.transport.register_with_event_loop(conn.connection, self.hub) File "/usr/lib/python2.7/dist-packages/kombu/transport/librabbitmq.py", line 148, in register_with_event_loop connection.fileno(), self.on_readable, connection, loop, File "/usr/lib/python2.7/dist-packages/kombu/async/hub.py", line 215, in add_reader return self.add(fds, callback, READ | ERR, args) File "/usr/lib/python2.7/dist-packages/kombu/async/hub.py", line 166, in add self.poller.register(fd, flags) File "/usr/lib/python2.7/dist-packages/kombu/utils/eventio.py", line 78, in register self._epoll.register(fd, events) ValueError: I/O operat
Print view Search Advanced search 9 posts • Page 1 of 1 m477 Posts: 11 Joined: 07 Dec 2012 03:01 Baruwa / Celery Broker err, broken.. Quote Postby m477 » 13 Dec 2012 00:16 So when previewing a message in Baruwa, I'm getting:Sorry the requested page is unavailable due to a server malfunction.Enabled debug in Baruwa and it shows:Code: Select allRequest Method: GET
Request URL: http://mail.insolvencysolutions.com.au/messages/preview/538388599.A32D2/
Django Version: 1.2.3
Exception Type: IOError
Exception Value:
Socket closed
Exception Location: /usr/lib/pymodules/python2.6/amqplib/client_0_8/method_framing.py in read_method, line 215
Python Executable: /usr/bin/python
Python Version: 2.6.6
Python Path: ['/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/pymodules/python2.6']
Server time: Thu, 13 Dec 2012 02:12:05 +0200
So, I'm guessing it's my celery broker details. But I know nothing about celery.Help darky? Top m477 Posts: 11 Joined: 07 Dec 2012 03:01 Re: Baruwa / Celery Broker err, broken.. Quote Postby m477 » 13 Dec 2012 00:23 more info:Code: Select allroot@efa:/etc/mysql# tail -f /var/log/baruwa/celeryd.log
[2012-12-13 02:19:42,198: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 6 seconds...
[2012-12-13 02:19:51,210: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 8 seconds...
[2012-12-13 02:20:02,223: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 10 seconds...
[2012-12-13 02:20:15,252: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 12 seconds...
[2012-12-13 02:20:30,268: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 14 seconds...
[2012-12-13 02:20:47,303: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 16 seconds...
Top m477 Posts: 11 Joined: 07 Dec 2012 03:01 Re: Baruwa / Celery Broker err, broken.. Quote Postby m477 » 13 Dec 2012 01:08 alright I fixed it, not sure what the issue is, but it was rabbitmq.I uninstalled it and purged;Code: Select