Following to
Clustering Ejabberd Nodes Using Mnesia
, my first node ejabberd@192.168.1.61 starts successful. In other machine, I can start Erlang node with:
erl -name ejabberd@192.168.1.62 -mnesia extra_db_nodes "['ejabberd@192.168.1.61']" -s mnesia
In WebAdmin of the first node, I see 2 running nodes. I also check mnesia:info(). at erlang shell of second, there is a line:
running db nodes = ['ejabberd@192.168.1.61','ejabberd@192.168.1.62']
Then synchronize databases successful
mnesia:change_table_copy_type(schema, node(), disc_copies).
{atomic,ok}
After quitting of erlang shell, at current directory it generates Mnesia.ejabberd@192.168.1.62 directory. I move it in to database directory and change its name to ejabberd@192.168.1.62.
After editing ejabberdctl file (adding the option -mnesia extra_db_nodes "['ejabberd@192.168.1.61']" -s mnesia in #start section), I've started ejabberd in second node, but it fails with error:
[4 times]
=ERROR REPORT==== 24-Jan-2011::19:12:34 ===
** Generic server pg2_backport terminating
** Last message in was {'$gen_cast',
{exchange,'ejabberd@192.168.1.61',
[[{ejabberd_node_groups,backend},
[<9746.278.0>]],
[{ejabberd_node_groups,frontend},
[<9746.278.0>]]]}}
** When Server state == {state}
** Reason for termination ==
** {{badarg,[true]},
[{pg2_backport,'-store/1-lc$^0/1-0-',1},
{pg2_backport,store,1},
{pg2_backport,handle_cast,2},
{gen_server,handle_msg,5},
{proc_lib,init_p,5}]}
Could you suggest solution to overcome ?
broken pg2 module
This is probably related to the broken pg2 module bug reported athttps://support.process-one.net/browse/EJAB-1349
The patch attached to that issue should fix this problem.