使用RabbitMQ启动django-芹菜时出现致命错误[未知AMQP方法(10,60)]



我正在尝试在debian服务器上建立一个Django实例,Django -芹菜与RabbitMQ进行分布式任务对话。

我可以得到RabbitMQ服务器设置,它将响应一个良好的状态,但一旦芹菜与RabbitMQ联系,它抛出一个错误并关闭。下面是我尝试启动芹菜的开发实例时的样子:

[2013-03-08 16:59:23,707: WARNING/MainProcess] celery@myserver ready.
[2013-03-08 16:59:23,725: INFO/MainProcess] consumer: Connected to amqp://celery_rabbit@127.0.0.1:5672//rabbit_vhost.
[2013-03-08 16:59:23,734: ERROR/MainProcess] Unrecoverable error: AMQPError('Unknown AMQP method (10, 60)', None, None, None, '')
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/celery/worker/__init__.py", line 351, in start
    component.start()
  File "/usr/local/lib/python2.6/dist-packages/celery/worker/consumer.py", line 392, in start
    self.reset_connection()
  File "/usr/local/lib/python2.6/dist-packages/celery/worker/consumer.py", line 748, in reset_connection
    self.reset_pidbox_node()
  File "/usr/local/lib/python2.6/dist-packages/celery/worker/consumer.py", line 687, in reset_pidbox_node
    callback=self.on_control,
  File "/usr/local/lib/python2.6/dist-packages/kombu/pidbox.py", line 71, in listen
    consumer.consume()
  File "/usr/local/lib/python2.6/dist-packages/kombu/messaging.py", line 401, in consume
    self._basic_consume(T, no_ack=no_ack, nowait=False)
  File "/usr/local/lib/python2.6/dist-packages/kombu/messaging.py", line 522, in _basic_consume
    no_ack=no_ack, nowait=nowait)
  File "/usr/local/lib/python2.6/dist-packages/kombu/entity.py", line 571, in consume
    nowait=nowait)
  File "/usr/local/lib/python2.6/dist-packages/amqp/channel.py", line 1766, in basic_consume
    (60, 21),  # Channel.basic_consume_ok
  File "/usr/local/lib/python2.6/dist-packages/amqp/abstract_channel.py", line 69, in wait
    self.channel_id, allowed_methods)
  File "/usr/local/lib/python2.6/dist-packages/amqp/connection.py", line 230, in _wait_method
    self.wait()
  File "/usr/local/lib/python2.6/dist-packages/amqp/abstract_channel.py", line 71, in wait
    return self.dispatch_method(method_sig, args, content)
  File "/usr/local/lib/python2.6/dist-packages/amqp/abstract_channel.py", line 85, in dispatch_method
    raise AMQPError('Unknown AMQP method %r' % (method_sig, ))
AMQPError: Unknown AMQP method (10, 60)

只是为了确认,我可以检查RabbitMQ之后仍在运行:

# rabbitmqctl status
Status of node rabbit@myserver ...
[{running_applications,[{rabbit,"RabbitMQ","1.8.1"},
                        {mnesia,"MNESIA  CXC 138 12","4.4.14"},
                        {os_mon,"CPO  CXC 138 46","2.2.5"},
                        {sasl,"SASL  CXC 138 11","2.1.9.2"},
                        {stdlib,"ERTS  CXC 138 10","1.17"},
                        {kernel,"ERTS  CXC 138 10","2.14"}]},
 {nodes,[{disc,[rabbit@myserver]}]},
 {running_nodes,[rabbit@myserver]}]
...done.

这是最后一件事阻止我启动我的网站,让我疲惫不堪,所以任何帮助将非常感激!谢谢。

将kombu降级到2.4.7将修复它。rabbitmq-server还不够新,不能支持AMQP 0-9-1

我在Ubuntu中也遇到了同样的问题。看起来(可能取决于Ubuntu版本)包含的RabbitMQ包可能是过时的。RabbitMQ安装指南说这是完全可能的。因此,他们建议从他们的网站上安装。deb包。

相关内容

  • 没有找到相关文章

最新更新