Ask Your Question
0

Cinder unable to connect to RabbitMQ

asked 2013-08-28 18:44:42 -0500

zipmaster07 gravatar image

updated 2013-08-28 21:24:18 -0500

Jobin gravatar image

the cinder logs are giving me errors about not being able to connect to the AMQP server. From the /var/log/cinder/cinder-scheduler.log & /var/log/cinder/cinder-volume.log files:

2013-08-28 17:00:06     INFO [cinder.openstack.common.rpc.common] Reconnecting to AMQP server on 127.0.0.1:5672
2013-08-28 17:00:09    ERROR [cinder.openstack.common.rpc.common] AMQP server on 127.0.0.1:5672 is unreachable: Socket closed. Trying again in 30 seconds.

From the /etc/rabbitmq/rabbitmq.config file:

jschaeffer@reaper:~$ sudo cat /etc/rabbitmq/rabbitmq.config
[sudo] password for jschaeffer:
[
  {rabbit, [
    {tcp_listeners,[{"0.0.0.0", 5672}]}
  ]}
].

Status of the rabbitmq service:

jschaeffer@reaper:~$ sudo service rabbitmq-server status
Status of node rabbit@reaper ...
[{pid,22429},
 {running_applications,[{rabbit,"RabbitMQ","2.8.4"},
                        {os_mon,"CPO  CXC 138 46","2.2.9"},
                        {sasl,"SASL  CXC 138 11","2.2.1"},
                        {mnesia,"MNESIA  CXC 138 12","4.7"},
                        {stdlib,"ERTS  CXC 138 10","1.18.1"},
                        {kernel,"ERTS  CXC 138 10","2.15.1"}]},
 {os,{unix,linux}},
 {erlang_version,"Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:2:2] [async-threads:30] [kernel-poll:true]\n"},
 {memory,[{total,26755960},
          {processes,10350510},
          {processes_used,10350496},
          {system,16405450},
          {atom,504409},
          {atom_used,474005},
          {binary,434144},
          {code,11898135},
          {ets,770360}]},
 {vm_memory_high_watermark,0.39999999990308427},
 {vm_memory_limit,1650919014},
 {disk_free_limit,1000000000},
 {disk_free,12738760704},
 {file_descriptors,[{total_limit,924},
                    {total_used,3},
                    {sockets_limit,829},
                    {sockets_used,1}]},
 {processes,[{limit,1048576},{used,118}]},
 {run_queue,0},
 {uptime,3011}]
...done.

Info about the network:

jschaeffer@reaper:~$ sudo lsof +M -i4 | grep rabbitmq
epmd      19081    rabbitmq    3u  IPv4  47376      0t0  TCP *:epmd (LISTEN)
epmd      19081    rabbitmq    5u  IPv4  54997      0t0  TCP localhost:epmd->localhost:55979 (ESTABLISHED)
beam.smp  22429    rabbitmq    8u  IPv4  55370      0t0  TCP *:52197 (LISTEN)
beam.smp  22429    rabbitmq    9u  IPv4  55372      0t0  TCP localhost:55979->localhost:epmd (ESTABLISHED)
beam.smp  22429    rabbitmq   16u  IPv4  55384      0t0  TCP *:amqp (LISTEN)

jschaeffer@reaper:~$ sudo netstat -tulpn | grep 5672
tcp        0      0 0.0.0.0:5672            0.0.0.0:*               LISTEN      22429/beam.smp
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-11-22 02:10:59 -0500

svsujeet gravatar image

updated 2013-11-24 00:29:18 -0500

I had the same problem on Ubuntu 12.04. Here is the process I followed and it helped me and so writing it down here:

Run rabbitmqctl environment to verify listening IP and port. By default rabbit is listening on all interfaces on port 5672

cd /etc/log/cinder/

run tail -F * Here I found the above error.

cd /etc/log/rabbitmq/

run tail -F *

Here I found that rabbit was not authenticating connections from virtual host /.

This is the virtual host set in the /etc/cinder/cinder.conf. If no virtual host is set the default is /

rabbitmqctl set_permissions -p / <user> "." "." ".*"</user>

This fixed it

edit flag offensive delete link more
0

answered 2013-08-28 18:58:54 -0500

zipmaster07 gravatar image

Okay I found the problem. I had this in my /etc/cinder/cinder.conf file which I pulled from the quick installation guide:

rabbit_host = 127.0.0.1 rabbit_port = 5672 rabbit_userid = guest rabbit_password = password rabbit_virtual_host = /nova

I commented out the "rabbit_virtual_host", restarted all cinder services and I can see a successful connection to AMQP now.

edit flag offensive delete link more

Comments

2

Please accept the answer if it has worked for you.

Jobin gravatar imageJobin ( 2013-08-28 21:26:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-08-28 18:44:42 -0500

Seen: 4,548 times

Last updated: Nov 24 '13