Search code examples
herokurabbitmqamqpcloudamqp

using rabbitmqadmin to access CloudAMQP / Heroku


I'm starting out to learn about AMQP and RabbitMQ.

To get myself going I have used a CLI tool, rabbitmqadmin, to successfully publish data to a RabbitMQ development install I have created upon my Mac OS X box. So far so good, I can publish messages, and watch them dequeue...

However when I come to try the exact same functionality upon the Heroku / CloudAMQP instance the rabbitmqadmin client seems to fall over.

This is the call:

rabbitmqadmin --host lemur.cloudamqp.com --vhost app4444444_heroku.com --user app4444444_heroku.com --password <withheld> publish routing_key=test payload="hello"

...and this is the output:

Traceback (most recent call last):
  File "/usr/local/bin/rabbitmqadmin", line 828, in <module>
    main()
  File "/usr/local/bin/rabbitmqadmin", line 325, in main
    method()
  File "/usr/local/bin/rabbitmqadmin", line 428, in invoke_get
    result = self.post(uri, json.dumps(upload))
  File "/usr/local/bin/rabbitmqadmin", line 354, in post
    return self.http("POST", path, body)
  File "/usr/local/bin/rabbitmqadmin", line 377, in http
    resp = conn.getresponse()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1013, in getresponse
    response.begin()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 402, in begin
    version, status, reason = self._read_status()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 366, in _read_status
    raise BadStatusLine(line)
httplib.BadStatusLine: ''

Any thoughts or ideas gratefully received!


Solution

  • Add --ssl to the command line. CloudAMQP's web ui is https only.