0

I am trying to change node name of mongooseim to my local ip, something like 10.0.0.21. I changed the config in MongooseIM/rel/vars.config.>

{node_name,"mongooseim@10.0.0.21"}

Is there anything i need to change?

I am getting the following error when i change the node name

=INFO REPORT==== 11-Mar-2016::17:11:05 === Can't set short node name! Please check your configuration escript: exception error: no match of right hand side value {error, {{shutdown, {failed_to_start_child,net_kernel, {'EXIT',nodistribution}}}, {child,undefined,net_sup_dynamic, {erl_distribution,start_link, [['mongooseim_maint_6589@10.0.XXX.XXX', shortnames]]}, permanent,1000,supervisor, [erl_distribution]}}}

Krishna
  • 41
  • 4

1 Answers1

1

From what you write I assume that you're changing the node name at build time and relying on the build machinery to generate correct configuration file. This is OK.

In this light, you also have to modify rel/files/vm.args - find the line:

-sname {{node_name}}

and change it to:

-name {{node_name}}

Now the explanation. -name is used to run an Erlang node as a distributed node. This requires a DNS server to be set up. -sname also enables distributed mode, but is fine with just /etc/hosts entries - the node names, however, can't contain dots: host@localdomain is fine, but host@my.fictional.domain is not. The latter is your case, with the small difference that you use numbers instead of words.

Please note that nodes using -name can't use Distributed Erlang communication with nodes using -sname.


For a production multi-node cluster you might consider generating the server release once, taking the generated config files, tweaking them to your needs and replicating as makes sense for the expected number of nodes. Then each time you deploy a new node you use the same generated release (which saves on build time), but add your configuration files customized for the relevant node.

erszcz
  • 1,630
  • 10
  • 16
  • Hi I am trying to setup, multi node Mongooseim cluster in AWS. Installed mongooseim using dpkg -i mongooseim-, Ran "mongooseimctl start it came up fine. updated -sname to mongooseim@[hostname] to form a cluster but after that it is not commin up. getting this error "Failed RPC connection to the node 'node1@': nodedown" all requird ports are open. any idea what I am missing, any help would be much appreciated. – user1453927 Sep 09 '20 at 22:03
  • @user1453927 Does ordinary `ping $other_host` in bash work between your hosts? If ping works, does `net_adm:ping('mongooseim@[other_host]')` in the Erlang shell work? Also, check if both nodes return the same `erlang:get_cookie()`. In the situation you're in it's important to find out if it's networking between the hosts failing or just Distributed Erlang connections not getting through. – erszcz Sep 11 '20 at 12:49