1

I wanted to install latest ejabberd from https://github.com/processone/ejabberd. For this, Erlang/OTP 18 is required. That too, i have manually installed from https://github.com/erlang/otp. Then, i need to start ejabberd server with command ejabberdctl start. But there is some error in that. My mnesia node name is akash@akash-Latitude-3450 and ejabberd nodename is akash@localhost. Due to this, server is not getting started. How to resolve this conflict ?

Log ->

2016-01-07 18:38:20.410 [critical] <0.39.0>@ejabberd_app:db_init:125 Node name mismatch: I'm [ejabberd@localhost], the database is owned by ['ejabberd@akash-Latitude-3450']

2016-01-07 18:38:20.410 [critical] <0.39.0>@ejabberd_app:db_init:127 Either set ERLANG_NODE in ejabberdctl.cfg or change node name in Mnesia

2016-01-07 18:38:20.410 [error] <0.38.0> CRASH REPORT Process <0.38.0> with 0 neighbours exited with reason: node_name_mismatch in ejabberd_app:db_init/0 line 129 in application_master:init/4 line 134

legoscia
  • 39,593
  • 22
  • 116
  • 167
Akash
  • 103
  • 8

1 Answers1

2

You have two options:

  1. name your Erlang node with the name matching your Mnesia database when you start ejabberd. As suggested by error message, it can be changed in var ERLANG_NODE in ejabberdctl.cfg.
  2. Backup Mnesia database by starting the node under old name, do a fresh install and restore your data with node started with the new name.
Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
  • Thanks for that. But how to configure mnesia ? – Akash Jan 07 '16 at 17:06
  • @Akash There's [another stack overflow question](http://stackoverflow.com/questions/463400/how-to-rename-the-node-running-a-mnesia-database) specifically detailing how to backup Mnesia and restore it with a different node name, if you follow option 2 of Mickaël Rémond's answer. – Michael Jan 07 '16 at 19:01
  • Mnesia is using the node name of the Erlang VM. if you are starting ejabberd with ejabberdctl, you can tweak it in ejabberdctl.cfg, as mentioned. – Mickaël Rémond Jan 07 '16 at 21:22