ejabberd cluster odbc sql_pool error fix
Sat, Nov 6, 2010 dev opsI’ve been experimenting with ejabberd as an xmpp server and so far it’s been great with one glaring caveat. When I attempted to cluster multiple nodes using odbc authentication I encountered an error on the non-master nodes along these lines:
E(<0.38.0>:ejabberd_rdbms:67) : Start of supervisor 'ejabberd_odbc_sup_jabber.taco' failed:
{error,{{'EXIT',{badarg,[{ets,delete,[sql_pool,"xmpp.taco.com"]},
A quick google returned no major help. It seems that the normal cluster setup procedure does not create/copy a required table, the sql_pool table.
To fix this you need to start the erlang repl and run: mnesia:add_table_copy(sql_pool, node(), ram_copies).
After that’s complete, odbc should start and the node should be fully functional. Good luck, ymmv.
Helpful clustering links:
It’s worth noting that nuking the database directory seems to be equivalent to mnesia:delete_schema([node()]).