Hello,
It appears that you can use IP addresses when you use the following two variables in /etc/rabbitmq/rabbitmq-env.conf
RABBITMQ_USE_LONGNAME=true
Note that you'll probably have to create the rabbitmq-env.conf file as it doesn't exist by default. If you had started RabbitMQ prior to making these changes, the previous configuration stored in /var/lib/rabbitmq will no longer be valid.
All nodes in your cluster must use these settings with unique IP addresses, of course, that must match the host's IP address. Don't forget to ensure all nodes are using the same value in /var/lib/rabbitmq/.erlang.cookie
I tested the above settings by creating two virtual machines using Vagrant and VirtualBox (the other box used 10.0.50.51):
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.hostname = "UBUNTU-16"
config.vm.network "private_network", ip: "10.0.50.50"
end
The private network allows communication between the two nodes. After setting up Erlang 20, RabbitMQ 3.6.12, the Erlang cookie, and then clustering the nodes, it appears to be working fine:
root@UBUNTU-16-2:~# rabbitmqctl cluster_status
{cluster_name,<<"rabbit@UBUNTU-16-2">>},
{partitions,[]},
Please give this a try and let me know how it works in your environment.
Thanks,
Luke