How to stop ejabberd from using mnesia
Posted
by
Eldad Mor
on Stack Overflow
See other posts from Stack Overflow
or by Eldad Mor
Published on 2010-12-03T22:12:32Z
Indexed on
2011/03/08
8:10 UTC
Read the original article
Hit count: 369
I'm trying to establish a procedure for restoring my database from a crashed server to a new server. My server is running Ejabberd as an XMPP server, and I configured it to use postgresql instead of mnesia - or so I thought.
My procedure goes something like "dump the contents of the original DB, run the new server, restore the contents of the DBs using psql, then run the system". However, when I try running Ejabberd again I get a crash:
=CRASH REPORT==== 3-Dec-2010::22:05:00 ===
crasher:
pid: <0.36.0>
registered_name: []
exception exit: {bad_return,{{ejabberd_app,start,[normal,[]]},
{'EXIT',"Error reading Mnesia database"}}}
in function application_master:init/4
Here I was thinking that my system is running on PostgreSQL, while it seems I was still using Mnesia. I have several questions:
- How can I make sure mnesia is not being used?
- How can I divert all the ejabberd activities to PGSQL?
This is the modules part in my ejabberd.cfg file:
{modules,
[
{mod_adhoc, []},
{mod_announce, [{access, announce}]}, % requires mod_adhoc
{mod_caps, []},
{mod_configure,[]}, % requires mod_adhoc
{mod_ctlextra, []},
{mod_disco, []},
{mod_irc, []},
{mod_last_odbc, []},
{mod_muc, [
{access, muc},
{access_create, muc},
{access_persistent, muc},
{access_admin, muc_admin},
{max_users, 500}
]},
{mod_offline_odbc, []},
{mod_privacy_odbc, []},
{mod_private_odbc, []},
{mod_pubsub, [ % requires mod_caps
{access_createnode, pubsub_createnode},
{plugins, ["default", "pep"]}
]},
{mod_register, [
{welcome_message, none},
{access, register}
]},
{mod_roster_odbc, []},
{mod_stats, []},
{mod_time, []},
{mod_vcard_odbc, []},
{mod_version, []}
]}.
What am I missing?
I am assuming the crash is due to the mnesia DB being used by Ejabberd, and since it's out of sync with the PGSQL DB, it cannot operate correctly - but maybe I'm totally off track here, and would love some direction.
EDIT: One problem solved. Since I'm using amazon cloud, I needed to hardcode the ERLANG_NODE so it won't be defined by the hostname (which changes on reboot). This got my ejabberd running, but still I wish to stop using mnesia, and I wonder what part of ejabberd is still using it and how can I found it.
© Stack Overflow or respective owner