When starting ejabberd, the log shows this error:

error_info: "invalid return value from ejabberd_app:start(normal,[]) -> {'EXIT',\n


When trying to configure ejabberd, the Mnesia database files for the table 'config' could not be read or written to disc.


Make sure the directory where Mnesia is supposed to store files exists and the user that runs ejabberd has write access to it.

Since the name of this directory depends on the node name, make sure the node name is what you expect it to be. You can see the node name by starting erl with only the -name or -sname parameter, and looking at the prompt.

If the problem is that you modified your machine hostname, you have three solutions:

  • If the old Mnesia database doesn't contain important information, you can remove it and ejabberd will generate it again.
  • If it has important information, you can convert it following the tutorial: Migrate Database to Another Host
  • Another alternative is to modify the ejabberd start script, and set as erlang node name your old erlang node name. The node name is passed to Erlang with the options -sname or -name. Since ejabberd 2.0.0, the node name can be modified in the file /etc/ejabberd/ejabberdctl.cfg . In Debian and Ubuntu packages, it can be modified in the file /etc/default/ejabberd . With this change ejabberd will start correctly using the old database. But in order to use ejabberdctl, you may need to add the old machine hostname to /etc/hosts.

Thanks to Sergei Golovan and Atmihaly.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


Directory (/var/lib/ejabberd) exists, user (ejabberd) have all rights. But error happens again.

This error message is shown

This error message is shown also in case when mnesia database is configured for using on another erlang node. Typical case is changing hostname.

Syndicate content