Setting a VerneMq cluster (VBox

975 Views Asked by At

My idea is to install a VerneMQ cluster on test environment (no need of security here). I installed VerneMq(1.4.1) on 2 different VMs on Virtual Box (Ubuntu 16). I started the 2 instances of VerneMQ and their status are well "Active". I try to do (in both side)

sudo vmq-admin cluster join discovery-node=192.168.56.103:44000

But I got all the time this error

Couldn't join cluster due to not_reachable

As there is no need of security for the moment I flushed the IPtables with

sudo iptables -F
sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT

and even stopped the firewall

sudo ufw disable

I also tried to ping and check the port with nmap (I changed the port to 44000 in case of....):

sudo nmap 192.168.56.103 -p 44000

I got all the result (for nmap) :

PORT      STATE SERVICE
44000/tcp open  unknown

Although all that I continue to get the error

Couldn't join cluster due to not_reachable

Thanks for the one that have an idea

1

There are 1 best solutions below

2
On

Please review the notes on cluster communication in the docs: https://vernemq.com/docs/clustering/communication.html

You'll want to configure the following config values in the vernemq.conf. (the port_range one is so that you can configure any firewall between the nodes)

    erlang.distribution.port_range.minimum = 6000
    erlang.distribution.port_range.maximum = 7999

    listener.vmq.clustering = (internal-ip):44053

Btw: you don't need to add the port in the cluster join command for the discovery-node

EDIT:

  • Do you use the same distributed_cookie for both nodes?
  • Does port 4369 (EPMD default port) allow incoming requests on both nodes?