Issue seen when clustering ejabberd 16.06 with 15.11

Hi all,

I see an issue when trying to cluster ejabberd 16.06 with already running 15.11. I issue join_cluster command from the 16.06 machine. On issuing list_cluster I see that that it has clustered with 15.11 version.
During the restart of 15.11 machine, I see that that ejabberd does not start at all, the logs indicate the below error:-

2016-08-17 11:36:54.479 [debug] <0.363.0> Supervisor ejabberd_sup started ejabberd_hooks:start_link() at pid <0.364.0>
2016-08-17 11:36:54.481 [debug] <0.32.0> Supervisor kernel_safe_sup started pg2:start_link() at pid <0.366.0>
2016-08-17 11:36:54.499 [debug] <0.363.0> Supervisor ejabberd_sup started ejabberd_node_groups:start_link() at pid <0.365.0>
2016-08-17 11:36:54.499 [debug] <0.363.0> Supervisor ejabberd_sup started ejabberd_system_monitor:start_link() at pid <0.367.0>
2016-08-17 11:36:54.499 [error] <0.368.0> CRASH REPORT Process <0.368.0> with 0 neighbours exited with reason: no case clause matching [domain,server_host,pid,local_hint] in ejabberd_router:update_tables/0 line 397 in gen_server:init_it/6 line 330
2016-08-17 11:36:54.499 [error] <0.363.0> Supervisor ejabberd_sup had child ejabberd_router started with ejabberd_router:start_link() at undefined exit with reason no case clause matching [domain,server_host,pid,local_hint] in ejabberd_router:update_tables/0 line 397 in context start_error
2016-08-17 11:36:54.502 [error] <0.37.0> CRASH REPORT Process <0.37.0> with 0 neighbours exited with reason: no such process or port in call to gen_server:call(ejabberd_sup, {start_child,{ejabberd_sm,{ejabberd_sm,start_link,[]},transient,1000,worker,[ejabberd_sm]}}, infinity) in application_master:init/4 line 133
2016-08-17 11:36:54.502 [info] <0.7.0> Application ejabberd exited with reason: no such process or port in call to gen_server:call(ejabberd_sup, {start_child,{ejabberd_sm,{ejabberd_sm,start_link,[]},transient,1000,worker,[ejabberd_sm]}}, infinity)

Is this something that is already known? Please can anyone help with this.

Also, Pub-sub functionality is broken in this cluster setup.
I see the below error when trying to create profile using 15.11 ejabberd (that is already clustered with 16.06):-

2016-08-16 12:53:20.653 [debug] <0.400.0>@ejabberd_router:do_route:324 route
from {jid,<<>>,<<"pubsub.ejabberd">>,<<>>,<<>>,<<"pubsub.ejabberd">>,<<>>}
to {jid,<<"bmi-user">>,<<"bmi.ejabberd">>,<<>>,<<"bmi-user">>,<<"bmi.ejabberd">>,<<>>}
packet {xmlel,<<"iq">>,[{<<"id">>,<<"bmi-user-57ae15fde4b057aa64db2a5c-19-1471331160286">>},{<<"type">>,<<"result">>}],[{xmlel,<<"pubsub">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/pubsub">>}],[{xmlel,<<"create">>,[{<<"node">>,<<"AMS-profile1">>}],[]}]}]}
2016-08-16 12:53:20.653 [error] <0.400.0>@ejabberd_router:route:77 {{badrecord,route},[{ejabberd_router,do_route,3,[{file,"src/ejabberd_router.erl"},{line,364}]},{ejabberd_router,route,3,[{file,"src/ejabberd_router.erl"},{line,75}]},{mod_pubsub,handle_info,2,[{file,"src/mod_pubsub.erl"},{line,859}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,593}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,659}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
when processing: {{jid,<<>>,<<"pubsub.ejabberd">>,<<>>,<<>>,<<"pubsub.ejabberd">>,<<>>},{jid,<<"bmi-user">>,<<"bmi.ejabberd">>,<<>>,<<"bmi-user">>,<<"bmi.ejabberd">>,<<>>},{xmlel,<<"iq">>,[{<<"id">>,<<"bmi-user-57ae15fde4b057aa64db2a5c-19-1471331160286">>},{<<"type">>,<<"result">>}],[{xmlel,<<"pubsub">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/pubsub">>}],[{xmlel,<<"create">>,[{<<"node">>,<<"AMS-profile1">>}],[]}]}]}}

A generic response: ejabberd

A generic response: ejabberd clustering uses in part mnesia database clustering, that is, sharing mnesia database tables and their content. As new ejabberd versions may modify those tables, it isn't recommended to cluster ejabberd nodes running different ejabberd versions. Use 15.11 in all nodes, or 16.06 in all nodes, but don't mix them.

In that case, how will I get

In that case, how will I get the data from the older version moved into the new one?

You didn't specify what you

You didn't specify what you want exactly. I can imagine many options:

A) If you want to update ejabberd: stop old ejabberd, install new ejabberd, copy mnesia spool dir to new ejabberd, start new ejabberd. It will automatically update mnesia tables.

B) If you want to move old ejabberd from old machine to a new ejabberd in a new machine: stop old ejabberd, install new ejabberd in new machine, copy mnesia spool dir to new ejabberd, start new ejabberd. It will automatically update mnesia tables.

C) If you want to cluster old ejabberd from old machine with a new ejabberd in a new machine: you can't do that, as I explained. Before clustering you must have similar ejabberd versions in both machines. Two options:
C.X) install an old ejabberd in the new machine,
C.Y) or update the old ejabberd of old machine to new ejabberd Let's imagine you want to do that.... how?

How to do C.Y? First do A) to get a new ejabberd in the old machine. Then install the new ejabberd also in the new machine (but it doesn't have any database of course). Then run join_cluster in the ejabberd in the new machine, so it replicates the database from old machine.

Syndicate content