Celery Consumer Connection Error Socket Closed. Trying Again In
Contents |
here for a quick overview of the site Help Center Detailed answers to
Cannot Connect To Amqp Connection Refused
any questions you might have Meta Discuss the workings and consumer cannot connect to amqp guest * * 127.0 0.1 5672 policies of this site About Us Learn more about Stack Overflow the company Business Learn
Celery Errno 111 Connection Refused
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow celery rabbitmq connection refused Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Celery: Error in connecting to RabbitMQ Server up vote 7 down vote favorite I am starting to use celery by following this "First Steps with Celery". amqp://guest:guest@localhost:5672// I exactly used the tasks.py indicated on that link. However when I ran the task using, celery -A tasks worker --loglevel=info I am getting this error: [2014-09-16 20:52:57,427: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: Socket closed. Trying again in 2.00 seconds... The rabbitmq server is for sure running and below is the snippet of the log regarding the error: =ERROR REPORT==== 16-Sep-2014::20:53:09 === exception on TCP connection <0.235.0> from 127.0.0.1:58162 {channel0_error,starting, {amqp_error,access_refused, "AMQPLAIN login refused: user 'guest' - invalid credentials", 'connection.start_ok'}} =INFO REPORT==== 16-Sep-2014::20:53:09 === closing TCP connection <0.235.0> from 127.0.0.1:58162 =INFO REPORT==== 16-Sep-2014::20:53:15 === accepted TCP connection on [::]:5672 from 127.0.0.1:58163 =INFO REPORT==== 16-Sep-2014::20:53:15 === starting TCP connection <0.239.0> from 127.0.0.1:58163 =ERROR REPORT==== 16-Sep-2014::20:53:18 === exception on TCP connection <0.239.0> from 127.0.0.1:58163 {channel0_error,starting, {amqp_error,access_refused, "AMQPLAIN login refused: user 'guest' - invalid credentials", 'connection.start_ok'}} =INFO REPORT==== 16-Sep-2014::20:53:18 === closing TCP connection <0.239.0> from 127.0.0.1:58163 With this, I did the follow
here for a quick overview of the site Help Center Detailed answers to any
Celery Errno 104 Connection Reset By Peer
questions you might have Meta Discuss the workings and policies amqplain login refused: user 'guest' - invalid credentials of this site About Us Learn more about Stack Overflow the company Business Learn more about
Cannot Connect To Amqp Guest * * 127.0 0.1 5672 Errno 61 Connection Refused
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 Overflow http://stackoverflow.com/questions/25869858/celery-error-in-connecting-to-rabbitmq-server is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Connection problems - Celery/Django up vote 5 down vote favorite 6 long night... can't get my second Celery/RabbitMQ setup run to work. step 1 sudo rabbitmq-server runs: ok! step 2 http://stackoverflow.com/questions/4543534/connection-problems-celery-django python manage.py celeryd -l info error: [2010-12-28 03:38:24,690: ERROR/MainProcess] CarrotListener: Connection Error: Socket closed. Trying again in 28 seconds... I have definitely: added rabbitmq user and vhost updated the Django setings.py Edit: I think it might have to with installing from a .deb instead of apt-get. After uninstalling the deb and installing the apt-get version I get this: invoke-rc.d: initscript rabbitmq-server, action "start" failed. dpkg: error processing rabbitmq-server (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: rabbitmq-server E: Sub-process /usr/bin/dpkg returned an error code (1) My Solution: apt-get --purge remove rabbitmq-server apt-get install rabbitmq-server ...no comment...maybe need some sleep :) Any ideas on how I could debug this? :| python django ubuntu rabbitmq celery share|improve this question edited Dec 28 '10 at 4:11 asked Dec 28 '10 at 3:49 RadiantHex 7,7132295206 2 You added a vhost and user, did you set permissions? sudo rabbitmqctl set_permissions -p pretty much followed this tutorial step by step, and I have supervisor set up to daemonize everything. http://osdir.com/ml/python-amqp-celery-user/2012-06/msg00056.html It all starts up and runs, but celery's log eventually fills up with these: [2012-02-20 20:54:30,501: INFO/PoolWorker-1] connection refused child process calling self.run() [2012-02-20 20:54:30,502: INFO/PoolWorker-2] child process calling self.run() [2012-02-20 20:54:30,503: WARNING/MainProcess] celery@web202.webfaction.com has started. [2012-02-20 20:54:30,504: ERROR/MainProcess] Consumer: Connection Error: [Errno 111] Connection refused. Trying again in 2 seconds... [2012-02-20 20:54:35,508: cannot connect to ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 4 seconds... [2012-02-20 20:54:42,510: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 6 seconds... My django settings.py has: BROKER_HOST = "localhost" BROKER_PORT = 24400 BROKER_USER = " and I can't figure out why. The reported problem is "Socket closed" Exception Type: IOError Exception Value: Socket closed Exception Location: /var/www/prod.companyname.com/eggs/amqplib-1.0.2-py2.6.egg/amqplib/client_0_8/method_framing.py in read_method, line 221 See attached for the whole traceback. It's nice that there is a fairly precise error message, but I'm not sure where to go from here. Any help would be greatly appreciated. Even just some debugging tips! Rabbit seems to be working fine. sudo /usr/sbin/rabbitmqctl status Status of node 'rabbit@ip-10-46-145-220' ... [{running_applications,[{rabbit,"RabbitMQ","2.2.0"}, {os_mon,"CPO CXC 138 46","2.1.8"}, {sasl,"SASL CXC 138 11","2.1.5.4"}, {mnesia,"MNESIA CXC 138 12","4.4.7"}, {stdlib,"ERTS CXC 138 10","1.15.5"}, {kernel,"ERTS CXC 138 10","2.12.5"}]}, {nodes,[{disc,['rabbit@ip-10-46-145-220']}]}, {running_nodes,['rabbit@ip-10-46-145-220']}] ...done. Oh, I guess if you're gonna help it might be useful to know versions of things. Rabbit 2.2.0 celery-2.5.1-py2.6.egg django_celery-2.2.4-py2.6.egg Django 1.2.5 Centos 5.x 64-bit Thanks in advance, Liam django celeryd -l debug 2012-06-12 20:42:28,217 DEBUG root: loaded config 2012-06-12 20:42:28,218 INFO companyname.local_settings: Logging started [2012-06-12 17:42:29,756: WARNING/MainProcess] -------------- celery@ip-10-46-145-220 v2.5.1 ---- **** ----- --- * *** * -- [Configuration] -- * - **** --- . broker: amqp://companyname@localhost:5672// - ** ---------- . loader: djcelery.loaders.DjangoLoader - ** ---------- . logfile: [stderr]@DEBUG - ** ---------- . concurrency: 2 - ** ---------- . events: OFF - *** --- * --- . beat: OFF -- ******* ---- --- ***** ----- [Queues] -------------- . prod: exchange:prod (direct) binding:default [Tasks] . celery.backend_cleanup . celery.chord . celery.chord_unlock . obsidian.api2.tasks.add . obsidian.api2.tasks.process_audio [2012-06-12 17:42:29,757: DEBUG/MainProcess] [Worker] Loading modules. [2012-06-12 17:42:29,765: DEBUG/MainProcess] [Worker] Claiming components. [2012-06-12 17:42:29,765: DEBUG/MainProcess] [Worker] Building boot step graph. [2012-06-12 17:42:29,766: DEBUG/MainProcess] [Worker] New boot order: ['queues