0

I am new to emqtt and erlang. Using the documentation provided in emqtt.io I configured the emqtt in my machine and wanted to create a cluster. I followed the steps given below to create a node

erl -name node1@127.0.0.1
erl -name node2@127.0.0.1

And to connect these nodes i used the below command.

(node1@127.0.0.1)1> net_kernel:connect_node('node2@127.0.0.1')

I am not getting any response(true or false) after executing this command.

Also I tried the following command

./bin/emqttd_ctl cluster emqttd@192.168.0.10

but got a failure message

Failed to join the cluster: {node_down,'node1@127.0.0.1'}

When I hit the URL localhost:8080/status I am getting the following message

Node emq@127.0.0.1 is started
emqttd is running

But i couldn't get any details about the cluster.

Am I following the right steps?. Need help on the creation of cluster in emqtt.

Thanks in advance!!

2 Answers2

0

For each node that is created in a machine a separate process is initiated and on creating many bodes will finally end up with using the memory the most which leads to a situation where you will not be able to join any nodes in a cluster. Hence to join we have to stop the nodes that are not in use using the ./emqttd stop command

0

You need two emqx nodes running on different machine, as the port may conflicts with each other on the same machine.

And the node names MUST not use loopback ip address 127.0.0.1 such as node1@127.0.0.1.

Shawn
  • 21
  • 2