I am trying to configure a Django project to use Celery (I am using Django 1.3 on Debian Squeeze)
我正在尝试配置一个Django项目来使用Celery(我在Debian Squeeze上使用Django 1.3)
I installed django-celery (2.3.3) and then followed these instructions.
我安装了django-celery(2.3.3)然后按照这些说明操作。
My django celery settings are the following:
我的django芹菜设置如下:
BROKER_HOST = "localhost"
BROKER_PORT = 5672
BROKER_USER = "guest"
BROKER_PASSWORD = "guest"
BROKER_VHOST = "/"
When I try to launch the celery worker server with...
当我尝试用...启动芹菜工作服务器时
$ python manage.py celeryd -l info
I get the following output with a "Consumer: Connection Error: [Errno 111]" at the end :
我得到以下输出结尾的“消费者:连接错误:[Errno 111]”:
/home/thomas/virtualenv/ULYSSE/lib/python2.6/site-packages/djcelery/loaders.py:84: 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 "
[2011-09-20 12:14:00,645: WARNING/MainProcess]
-------------- celery@debian v2.3.3
---- **** -----
--- * *** * -- [Configuration]
-- * - **** --- . broker: amqp://guest@localhost:5672//
- ** ---------- . loader: djcelery.loaders.DjangoLoader
- ** ---------- . logfile: [stderr]@INFO
- ** ---------- . concurrency: 1
- ** ---------- . events: OFF
- *** --- * --- . beat: OFF
-- ******* ----
--- ***** ----- [Queues]
-------------- . celery: exchange:celery (direct) binding:celery
[Tasks]
. competitions.tasks.add
[2011-09-20 12:14:00,788: INFO/PoolWorker-1] child process calling self.run()
[2011-09-20 12:14:00,795: WARNING/MainProcess] celery@debian has started.
[2011-09-20 12:14:00,809: ERROR/MainProcess] **Consumer: Connection Error: [Errno 111] Connection refused. Trying again in 2 seconds**...
Apparently, my settings are correctly read (cf. Configuration section in the output) and the worker process is correctly started ("celery@debian has started")
显然,我的设置被正确读取(参见输出中的配置部分)并且正确启动了工作进程(“celery @ debian has started”)
I can not figure out why this "Consumer: Connection Error: [Errno 111]" error appends...
我无法弄清楚为什么这个“消费者:连接错误:[Errno 111]”错误附加...
Has this to do with the BROKER_USER and BROKER_PASSWORD settings?
这与BROKER_USER和BROKER_PASSWORD设置有关吗?
I tried different settings for user/password (my account, root account...) but I always get the same error. Does 'BROKER_USER' and 'BROKER_PASSWORD refer to a OS user, a database user, a "broker" user?
我尝试了不同的用户/密码设置(我的帐户,root帐户...),但我总是得到同样的错误。 “BROKER_USER”和“BROKER_PASSWORD”是指OS用户,数据库用户,“经纪人”用户吗?
How can I get rid of this Connection Error?
如何摆脱这种连接错误?
1 个解决方案
#1
16
Looks like rabbitmq isn't installed or running. Can you check this?
看起来像rabbitmq没有安装或运行。你能看看吗?
apt-get install rabbitmq-server
on Ubuntu
#1
16
Looks like rabbitmq isn't installed or running. Can you check this?
看起来像rabbitmq没有安装或运行。你能看看吗?
apt-get install rabbitmq-server
on Ubuntu