Erlang uses the EPMD port to find other nodes, so all servers must be able to speak to each other on this port. In an Erlang Cluster, all nodes are connected to all other nodes in a mesh. The Erlang epmd (erlang port mapper daemon) will use two ports, one for discovering other erlang nodes (default port 4369) and dynamic range for the actual communication.
All nodes in a cluster must use the same epmd port number for listening.
Also, note that Epmd keeps track of which Erlang node is using which ports on the local machine. If you want to restrict the range of ports that Erlang will use for inter-Erlang node communication to let's say 9100-9105, you can add the following lines to your app.config setting the kernel variables 'inet_dist_listen_min' and 'inet_dist_listen_max'.
Example:
{ kernel, [
{inet_dist_listen_min, 9100},
{inet_dist_listen_max, 9105}
]},
ensure that the range you set provides enough ports for all the nodes in the cluster.