RabbitMQ / Celery和Django挂起在delay / ready / etc-没有有用的日志信息 [英] RabbitMQ / Celery with Django hangs on delay/ready/etc - No useful log info

查看:123
本文介绍了RabbitMQ / Celery和Django挂起在delay / ready / etc-没有有用的日志信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我只需设置celery和rabbitmq,创建我的用户,设置虚拟主机,将用户映射到虚拟主机,然后成功运行celery守护程序(或者,我假设)

So I just setup celery and rabbitmq, created my user, setup the vhost, mapped the user to the vhost, and ran the celery daemon succesfully (or so I assume)

(queuetest)corky@corky-server:~/projects/queuetest$ ./manage.py celeryd
 celery@corky-server v0.9.5 is starting.
 Configuration ->
. broker -> amqp://celery@localhost:5672/
. queues ->
. celery -> exchange:celery (direct) binding:celery
. concurrency -> 2
. loader -> celery.loaders.djangoapp
. logfile -> [stderr]@WARNING
. events -> OFF
. beat -> OFF

Celery has started.

我创建了芹菜用户,因为在这种情况下我觉得自己不是很有创造力。

I created a user of "celery" because I wasn't feeling very inventive in this case.

当我尝试在celery文档中做一个简单的例子时:

When I try to do one of the simple examples within the celery docs:

>>> from tasks import add
>>> r = add.delay(2, 2)
>>> r
<AsyncResult: 16235ea3-c7d6-4cce-9387-5c6285312c7c>
>>> r.ready()
(hangs for eternity.)

所以我检查了FAQ,想知道还有什么可能发生的,它告诉我这是由于用户权限而引起的常见错误,因此我对这些内容进行了三重检查,什么也没做,使另一个新用户仍然没有。如果我从 carrot.connection 导入 DjangoBrokerConnection 并获取信息,则它与我的芹菜设置中的内容匹配。

So I checked the FAQ wondering what else could be up and it told me this is a common bug due to user permissions, so I triple checked those, nothing, made another new user, still nothing. If I import DjangoBrokerConnection from carrot.connection and get the information, it matches up with what's in my celery settings. The FAQ stated to check your log file.

我的 rabbit.log 文件在这种情况下不是很有帮助。

My rabbit.log file isn't very helpful in this situation, simply showing:

,只需显示:

And so forth. At this point, I'm at a loss as to what else my problem could be. I'm running Ubuntu Jaunty and installed RabbitMQ from apt-get.

等。在这一点上,我对我可能遇到的其他问题一无所知。我正在运行Ubuntu Jaunty,并从apt-get安装了RabbitMQ。

Thanks in advance for any help.

在此先感谢您的帮助。

推荐答案

我刚刚修复了一个非常丑陋的错误,该错误仅会引起新用户出现。 ( http://github.com/ask/celery/commit/a9c1316b15055b67ee3c38d294461fa82ed6d2>) / p>

请从github的master分支中提取。如果仍然无法正常工作,则
可能必须停止rabbitmq,删除rabbitmq数据库目录(通常 / var / lib / rabbitmq ),然后再次启动rabbitmq)

Please pull from the master branch at github. If it still doesn't work you probably have to stop rabbitmq, remove the rabbitmq database directory (usually /var/lib/rabbitmq) and start rabbitmq again)

不便之处,敬请原谅。
发生此错误是因为我们最近将使用者路由键选项的名称更改为绑定键,但是amqp库仍使用 routing_key ,我们忘记了重写该选项。

Really sorry for the inconvenience. The bug happened because we recently changed the name of the consumers routing key option to "binding key", but the amqp libraries still use routing_key and we forgot to rewrite the option.

这篇关于RabbitMQ / Celery和Django挂起在delay / ready / etc-没有有用的日志信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆