SSL connection with rabbitmq fails with error : Check login credentials: Socket closed

509 views
Skip to first unread message

ganm...@gmail.com

unread,
Apr 14, 2015, 4:54:16 PM4/14/15
to rabbitm...@googlegroups.com
Hi Team,
    SSL connection with rabbitmq fails with error : Check login credentials: Socket closed, even when right credentials are used.

    Here is the rabbitmq.config on the controller node:
[
  {kernel, [

  ]},
  {rabbit, [
    {tcp_listeners, []},
    {ssl_listeners, [5671]},
    {ssl_options, [{cacertfile,"/etc/rabbitmq/ssl/cacert.pem"},
                    {certfile,"/etc/rabbitmq/ssl/cert.pem"},
                    {keyfile,"/etc/rabbitmq/ssl/key.pem"},
                    {verify,verify_none},
                    {fail_if_no_peer_cert,false}]},
    {tcp_listen_options, [binary, {packet,raw},
                                  {reuseaddr,true},
                                  {backlog,128},
                                  {nodelay,true},# Options defined in nova.openstack.common.rpc
                                  {exit_on_close,false},
                                  {keepalive,false}]},
    {heartbeat, 580}
  ]}
].

Here is the rabbitmq related options set in nova.conf on controller

rpc_thread_pool_size=2048
rpc_conn_pool_size=60
rpc_response_timeout=60
rpc_backend=nova.openstack.common.rpc.impl_kombu
amqp_durable_queues=true
amqp_auto_delete=false

##### RABBITMQ #####
rabbit_userid=<...>
rabbit_password=<...>
rabbit_virtual_host=/
rabbit_host=9.114.195.165
rabbit_port=5671
rabbit_use_ssl=true
#nag begin
kombu_ssl_keyfile=/etc/rabbitmq/ssl/node-key.pem
kombu_ssl_certfile=/etc/rabbitmq/ssl/node-cert.pem
kombu_ssl_ca_certs=/etc/rabbitmq/ssl/cacert.pem
#nag end

the same options are also set on nova.conf on the compute node. (in otherwords, nova.conf file is same on both controller and compute).

Also, the rabbit userid and password are same in both the nova.conf files of controller and compute.

Further, the rabbitmq user and password are valid and exist in rabbitmq (rabbitmqctl list_users,  change_password etc., are done to verify this)

Also, the ssl connections, amqp listener etc., are working fine and listening on the rabbit port and I have tested that.
The problem is coming purely as authentication issue. Can you please suggest how to proceed further and establish connection?

Michael Klishin

unread,
Apr 14, 2015, 5:00:45 PM4/14/15
to ganm...@gmail.com, rabbitm...@googlegroups.com
 On 14 April 2015 at 23:54:19, ganm...@gmail.com (ganm...@gmail.com) wrote:
> The problem is coming purely as authentication issue. Can you
> please suggest how to proceed further and establish connection?

What RabbitMQ version do you use?
What's in the logs?

Have you tried following the steps in [1][2]?
Are you trying to use "guest" as the user? (I believe OpenStack docs suggest that) — it can only connect
from localhost with your configuration.

Also, just curious, where did you get the tcp_listen_options from? You typically don't have to modify them.

1. http://www.rabbitmq.com/ssl.html
2. http://www.rabbitmq.com/troubleshooting-ssl.html
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Reply all
Reply to author
Forward
0 new messages