txAMQP working with graphite

Asked by Mark Cheverton


I've posted this to the graphite team, but they've suggested that it may be a txamqp problem which should be raised here, hope you can help...

After several hours of messing around I'm stumped getting AMQP delivery to graphite working. I have graphite versions 0.9.8 across the board, plus python-txamqp-0.3 rabbitmq 2.5.1 on Ubuntu 10.04.2.

Fairly simple graphite config:

AMQP_HOST = localhost
AMQP_PORT = 5672
AMQP_VHOST = /arcus/graphite
AMQP_USER = arcus
AMQP_EXCHANGE = graphite

Am getting the following error:

==> console.log <==
14/07/2011 00:19:51 :: Starting factory <carbon.amqp_listener.AMQPReconnectingFactory instance at 0x8daa06c>
14/07/2011 00:19:51 :: Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 84, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 69, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 59, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 37, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/lib/python2.6/dist-packages/twisted/internet/epollreactor.py", line 210, in _doReadOrWrite
    why = selectable.doRead()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py", line 460, in doRead
    return self.protocol.dataReceived(data)
  File "/usr/local/lib/python2.6/dist-packages/txAMQP-0.3-py2.6.egg/txamqp/protocol.py", line 158, in dataReceived
    frame = self._unpackFrame(packet)
  File "/usr/local/lib/python2.6/dist-packages/txAMQP-0.3-py2.6.egg/txamqp/protocol.py", line 134, in _unpackFrame
    payload = Frame.DECODERS[frameType].decode(self.spec, c)
  File "/usr/local/lib/python2.6/dist-packages/txAMQP-0.3-py2.6.egg/txamqp/connection.py", line 94, in decode
    args = tuple([c.decode(f.type) for f in meth.fields])
  File "/usr/local/lib/python2.6/dist-packages/txAMQP-0.3-py2.6.egg/txamqp/codec.py", line 86, in decode
    return getattr(self, "decode_" + type)()
  File "/usr/local/lib/python2.6/dist-packages/txAMQP-0.3-py2.6.egg/txamqp/codec.py", line 184, in decode_table
    raise ValueError(repr(type))
exceptions.ValueError: 'F'

14/07/2011 00:19:51 :: <twisted.internet.tcp.Connector instance at 0x8daa08c> will retry in 9 seconds
14/07/2011 00:19:51 :: Stopping factory <carbon.amqp_listener.AMQPReconnectingFactory instance at 0x8daa06c>

A bit of brute force print statements (I'm not a pythonista unfortunately) has lead me to it bombing at the self.authentication and then back into txamqp then twisted where I get a bit lost.

root@lucid32:/opt/graphite/conf# rabbitmqctl list_vhosts
Listing vhosts ...
root@lucid32:/opt/graphite/conf# rabbitmqctl list_permissions -p /arcus/graphite
Listing permissions in vhost "/arcus/graphite" ...
arcus .* .* .*

Any ideas what the problem may be?


Question information

English Edit question
txAMQP Edit question
No assignee Edit question
Solved by:
Thomas Herve
Last query:
Last reply:
Revision history for this message
Best Thomas Herve (therve) said :

Hi Mark,

It sounds like it may be fixed by the linked bug (https://bugs.launchpad.net/txamqp/+bug/741147), which is not in the latest release I think. Can you try latest trunk? Thanks.

Revision history for this message
Mark Cheverton (mark-cheverton) said :

Yep, latest trunk cleaned up the problem. Thanks very much for your help.

Revision history for this message
Mark Cheverton (mark-cheverton) said :

Thanks Thomas Herve, that solved my question.