Hey all,
I'm stuck and need your help.
Trying to configure rabbit cluster with consul peer discovery. Never worked with consul before but I think I configured it OK.
Testing with two rabbit nodes; here is my config on both:
root@rabbitmq-auto-cluster01-7fkv:~# cat /etc/rabbitmq/rabbitmq.conf
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_consul
cluster_formation.consul.host = rabbitmq-auto-cluster01-consul
cluster_formation.consul.port = 8500 # 8500 is default
cluster_formation.consul.scheme = http # http is default
cluster_formation.consul.svc_addr_auto = true
When I start rabbit on both nodes, I'm getting no errors:
root@rabbitmq-auto-cluster01-7fkv:~# tail -15 /var/log/rabbitmq/rab...@rabbitmq-auto-cluster01-7fkv.log
2019-04-23 00:11:57.088 [info] <0.580.0> Management plugin: HTTP (non-TLS) listener started on port 15672
2019-04-23 00:11:57.089 [info] <0.686.0> Statistics database started.
2019-04-23 00:11:57.138 [notice] <0.106.0> Changed loghwm of /var/log/rabbitmq/rab...@rabbitmq-auto-cluster01-7fkv.log to 50
2019-04-23 00:11:57.350 [info] <0.8.0> Server startup complete; 11 plugins started.
* rabbitmq_federation_management
* rabbitmq_tracing
* rabbitmq_shovel_management
* rabbitmq_management
* rabbitmq_management_agent
* rabbitmq_peer_discovery_consul
* rabbitmq_shovel
* rabbitmq_web_dispatch
* rabbitmq_federation
* rabbitmq_event_exchange
* rabbitmq_peer_discovery_common
When I start rabbit on two nodes, I see this in consul:
root@rabbitmq-auto-cluster01-consul:/var/log# tail -f /var/log/syslog
Apr 23 03:06:04 rabbitmq-auto-cluster01-consul consul[20918]: 2019/04/23 03:06:04 [INFO] agent: Synced service "rabbitmq:rabbitmq-auto-cluster01-f10v"
Apr 23 03:06:09 rabbitmq-auto-cluster01-consul consul[20918]: 2019/04/23 03:06:09 [INFO] agent: Synced service "rabbitmq:rabbitmq-auto-cluster01-7fkv"
... and I also see this:
root@rabbitmq-auto-cluster01-consul:/var/log# consul catalog services
consul
rabbitmq
From both rabbit nodes I can connect to the other one on tcp/25672 (clustering port) by using short name of the other node
root@rabbitmq-auto-cluster01-7fkv:~# nc -v rabbitmq-auto-cluster01-f10v 25672
Connection to rabbitmq-auto-cluster01-f10v 25672 port [tcp/*] succeeded!
Ran tcpdump on a host listening to all traffic on port 25672 while starting rabbit on it and don't see any traffic on that port whatsoever. It's like the node doesn't even try to negotiate clustering with the peer.
Both nodes come up as standalone servers. And yes, I did set /var/lib/rabbitmq/.erlang.cookie
WHAT AM I MISSING???
Thanks!