Jagveer Singh
Jagveer Singh

Reputation: 584

how to set up ejabberd cluster?

I am using 2 ec2 instances on which ejabberd 13.12 is installed . I am following this guide for setting up cluster. On Second node when i run the command -

 erl -sname ejabberd \

-mnesia dir '"/var/lib/ejabberd/"' \

-mnesia extra_db_nodes "['ejabberd@first']" \

-s mnesia

On First Node error occurs -

Application ejabberd started on node ejabberd@ejabberdn1
dets: file "/var/lib/ejabberd/schema.DAT" not properly closed, repairing ...

=SUPERVISOR REPORT==== 27-May-2014::07:11:59 ===
 Supervisor: {local,mnesia_kernel_sup}
 Context:    child_terminated
 Reason:     killed
 Offender:   [{pid,<0.152.0>},
              {name,mnesia_locker},
              {mfargs,{mnesia_locker,start,[]}},
              {restart_type,permanent},
              {shutdown,3000},
              {child_type,worker}]


=SUPERVISOR REPORT==== 27-May-2014::07:11:59 ===
 Supervisor: {local,mnesia_kernel_sup}
 Context:    shutdown
 Reason:     reached_max_restart_intensity
 Offender:   [{pid,<0.152.0>},
              {name,mnesia_locker},
              {mfargs,{mnesia_locker,start,[]}},
              {restart_type,permanent},
              {shutdown,3000},
              {child_type,worker}]

It gives error of mnesia network partitioning on second node. How to resolve this problem?

Upvotes: 4

Views: 1176

Answers (2)

Jagveer Singh
Jagveer Singh

Reputation: 584

Finally , I solved my problem. The problem is with Erlang OTP version. I was using Ejabberd 13.12 and Erlang OTP 15B1 . Inspite this combination is working good in local network but not working on AWS EC2. Now I Have replaced Erlang OTP version with OTP 17 and my cluster is working fine.

Upvotes: 0

Echsecutor
Echsecutor

Reputation: 874

It is best to clear your local database files and have ejabberd regenerate them after you have set up host names, etc.

I have got my cluster running by following this guide up to step 5 on both nodes, then (since I did not want to use this custom module for database sync) I went to the guide you mentioned and did the database sync manually as you are currently trying to. (It still took me half a day to trace all errors, but with the above mentioned guides and googling error messages from the log files it finally worked out. ;) )

Upvotes: 1

Related Questions