Access RabbitMQ using floating IP associated with the VM

asked 2018-05-29 12:57:53 -0600

jachinte gravatar image

I have a virtual machine (VM) running on OpenStack, on which I installed OpenStack using Packstack. I associated a floating IP with that VM.

In OpenStack, I configured the ingress access rules for all OpenStack components and RabbitMQ:

....

Ingress     IPv4    TCP     15672   0.0.0.0/0
Ingress     IPv4    TCP     5672    0.0.0.0/0

I can access both RabbitMQ and the management plugin from the VM. However, I cannot access either of them from the floating IP. I can access the other OpenStack components successfully.

I have tried configuring iptables and modifying the RabbitMQ configuration file but neither worked. I am not an expert on these topics:

iptables -A INPUT -p tcp -m multiport --dports 5671,5672,15672 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -m multiport --dports 5671,5672,15672 -m conntrack --ctstate ESTABLISHED -j ACCEPT

Thank you for your help.


Additional Information

  • After installing OpenStack on the VM I had to manually update the public endpoints to access the OpenStack services through the floating IP.
  • I also updated (manually) the Horizon configuration file (/etc/httpd/conf.d/15-horizon_vhost.conf)

This is my RabbitMQ configuration file:

# /etc/rabbitmq/rabbitmq.config 

% This file managed by Puppet
% Template Path: rabbitmq/templates/rabbitmq.config
[
  {rabbit, [
    {tcp_listen_options, [
         {backlog,       128},
         {nodelay,       true},
         {linger,        {true, 0}},
         {exit_on_close, false}
    ]},
    {loopback_users, []},
    {tcp_listen_options, [binary,{packet, raw},{reuseaddr, true},{backlog, 128},{nodelay, true},{exit_on_close, false},{keepalive, true}]},
    {default_user, <<"guest">>},
    {default_pass, <<"guest">>}
  ]},
  {kernel, [

  ]}
].
% EOF
edit retag flag offensive close merge delete