5

I'm trying to set up an instance of Django on a debian server with django-celery talking to RabbitMQ for distributed tasks.

I can get the RabbitMQ server set up and it'll respond with a good status, but as soon as celery makes contact with RabbitMQ, it throws an error and shuts down. Here's what it looks like when I try to start a dev instance of celery:

[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://[email protected]: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)

Just to confirm, I can check that RabbitMQ is still running afterwards:

# 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.

This is the last thing preventing me from launching my site and has me all frazzled, so any help would be greatly appreciated! Thanks.

0

2 Answers 2

6

Downgrading kombu to 2.4.7 will fix it. The rabbitmq-server is not new enough to support AMQP 0-9-1.

1
  • You're right, thanks! Looks like these guys had the same problem: github issue
    – Lou
    Mar 9, 2013 at 2:57
1

I ran with the same problem in Ubuntu. It appears that (possibly depending on the Ubuntu version) the included RabbitMQ packages might be a outdated. And the RabbitMQ installation guide states that this is quite possible. Thus they recommend installing the .deb package from their web site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.