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. I even deployed a dummy consumer to the VM and it worked fine. However, I cannot access either of them from the floating IP. I can access the other OpenStack components successfully, such as Identity.
I tried modifying iptables, but it didn't work either:
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)
Form now onwards, localhost is 192.168.113.5, public IP is "floating IP".
Telnet results
(from the outside)
telnet <floating IP> 5672
Trying <floating IP>...
telnet: connect to address <floating IP>: Connection refused
telnet: Unable to connect to remote host
(from the VM)
telnet localhost 5672
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Things I have tried
lsof:
sudo lsof -n -i4TCP:5672 | grep LISTEN
<no-results>
ss:
sudo ss --tcp -f inet --listening --numeric --processes | grep 5672
LISTEN 0 128 *:25672 *:* users:(("beam.smp",pid=1310,fd=44))
LISTEN 0 128 *:15672 *:* users:(("beam.smp",pid=1310,fd=54))
netstat:
netstat --all --numeric --tcp --programs | grep 5672
tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN 1310/beam.smp
tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 1310/beam.smp
tcp 0 0 192.168.113.5:59962 192.168.113.5:5672 ESTABLISHED 3115/python2
...
tcp6 0 0 :::5672 :::* LISTEN 1310/beam.smp
tcp6 0 0 192.168.113.5:5672 192.168.113.5:59928 ESTABLISHED 1310/beam.smp
...
RabbitMQ:
rabbitmqctl list_connections
guest 192.168.113.5 59922 running
guest 192.168.113.5 59926 running
...
curl:
curl http://<floating IP>:15672/
curl: (7) Failed to connect to <floating IP> port 15672: Network is unreachable
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