[rabbitmq-discuss] Does rabbitmqadmin have any issues using SSL
Tim Watson
tim at rabbitmq.com
Thu Mar 21 09:36:58 GMT 2013
Hi James,
On 20 Mar 2013, at 22:02, James Damon wrote:
> 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.
The reason for that is in the following line...
> AMQP.start(:port => 5671,
>
This is making an AMQP connection, rather than an HTTP connection to the management web API.
> 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.
>
In that case you'll need to point the rabbitmqadmin script to a port that is listening for SSL connections.
> When I run rabbitmqadmin from the command line I get the same error:
[snip]
> rabbitmq at server.log
> =================
> =INFO REPORT==== 20-Mar-2013::14:56:42 ===
> accepting AMQP connection <0.2781.0> ([::1]:59661 -> [::1]:5671)
>
As you can see, the broker thinks that this is an AMQP connection (as it's connecting to an AMQP port).
> =ERROR REPORT==== 20-Mar-2013::14:56:42 ===
> closing AMQP connection <0.2781.0> ([::1]:59661 -> [::1]:5671):
> {bad_header,<<"GET /api">>}
>
Likewise, the HTTP protocol isn't understood by an AMQP protocol handler.
> [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
>
You'll need to change that ssl port to an HTTP one, and you'll need to configure the management web API to enable ssl and listen on an available port. See http://www.rabbitmq.com/mochiweb.html for details. HTH!
Cheers,
Tim
More information about the rabbitmq-discuss
mailing list