[rabbitmq-discuss] Does rabbitmqadmin have any issues using SSL

James Damon jdamon at gmail.com
Wed Mar 20 22:02:18 GMT 2013


Hi ,

So, I'm setting up my server to accept connections using SSL. My dilemma is 
that I can connect to the server just fine using the following ruby script.

===============
#!/usr/bin/ruby
require 'rubygems'
require 'amqp'

AMQP.start(:port => 5671, 
           :ssl => { 
             :cert_chain_file => "clientcert1.pem", 
             :private_key_file => "key1.pem"}
           ) do |con| 
  puts "ok"
  con.disconnect { puts "dont need to continue"; EventMachine.stop }
end


However, I want to use the existing rabbitmqadmin script to connect because 
I just want to insert simple JSON messages without writing my own code.

When I run rabbitmqadmin from the command line I get the same error: 

STDERR
========
Traceback (most recent call last):
  File "/home/jdamon/Scripts/rabbitmqadmin", line 914, in <module>
    main()
  File "/home/jdamon/Scripts/rabbitmqadmin", line 354, in main
    method()
  File "/home/jdamon/Scripts/rabbitmqadmin", line 496, in invoke_list
    format_list(self.get(uri), cols, obj_info, self.options)
  File "/home/jdamon/Scripts/rabbitmqadmin", line 612, in format_list
    formatter_instance.display(json_list)
  File "/home/jdamon/Scripts/rabbitmqadmin", line 623, in display
    (columns, table) = self.list_to_table(json.loads(json_list), depth)
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded


rabbitmq at server.log
=================
=INFO REPORT==== 20-Mar-2013::14:56:42 ===
accepting AMQP connection <0.2781.0> ([::1]:59661 -> [::1]:5671)

=ERROR REPORT==== 20-Mar-2013::14:56:42 ===
closing AMQP connection <0.2781.0> ([::1]:59661 -> [::1]:5671):
{bad_header,<<"GET /api">>}



The command I used to generate these errors was 

rabbitmqadmin -P 5671 --ssl  --ssl-key-file $SOME_PATH/key1.pem 
--ssl-cert-file=$SOME_PATH/clientcert1.pem  list users

or 

rabbitmqadmin -c rabbitmqadmin.conf -N host_ssl list queues

where

rabbitmqadmin.conf
===================
[host_normal]
hostname = localhost
port = 15672
username = guest
password = guest
declare_vhost = / # Used as default for declare / delete only
vhost = /         # Used as default for declare / delete / list

[host_ssl]
hostname = localhost
port = 5671
username = guest
password = guest
ssl = True
ssl_key_file = $SOME_PATH/key1.pem
ssl_cert_file = $SOME_PATH/clientcert1.pem



Anyone have any ideas why I can't connect to SSL using rabbitmqadmin ? Has 
anyone else been able to connect correctly using Rabbitmqadmin to the SSL 
port ? 


Thanks

-Jimi











-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130320/28e3c020/attachment.htm>


More information about the rabbitmq-discuss mailing list