0
votes

I am new to mongooseIM and I would like to create a new node ([email protected]) but when I try to run this command:

bin/mongooseimctl add_to_cluster [email protected] 

I get the following error:

Error: /usr/lib/mongooseim/Mnesia.mongooseim@localhost already exists. Please remove whole directory before continuing.

How can I create a new node without deleting the default node mongooseim@localhost?

I have the following configuration:

In my etc/vm.args configuration file:

-sname [email protected]

In etc/ejabberd.cfg file:

{hosts, ["myhostname.com”] }.

My mongooseIM directory:

/usr/lib/mongooseim
 bin
 erl_crash.dump
 erts-6.0
 etc
 lib
 log
 Mnesia.mongooseim@localhost
 releases
 var
sudo bin/mongooseimctl status
The node mongooseim@localhost is started with status: started

MongooseIM version 1.5.0 is running on that node.

1
I can't confirm MongooseIM behaviour now (on mobile), but the error message seems inconsistent with the quoted config. With sname myhostname.com, the error should not mention localhost. Still, is that the first node in the cluster? Is the server running? Do you need data from the Mnesia directory in question?erszcz

1 Answers

0
votes

Clustering in ejabberd is based on Mnesia. Once the schema is created for a given node name in Mnesia, you cannot change it later.

In your case you defined your node name using the localhost host name. It means you can only create a cluster (several Erlang nodes) local to that machine. This is probably not what you want.

So, if you want to change ejabberd node name you need to export the data from the Mnesia database, delete your Mnesia database folder, change the cluster node name to the new one and reimport your data. Here is a tutorial for ejabberd, that should get you on track: http://docs.ejabberd.im/admin/guide/managing/#change-computer-hostname