Skip to content

Fighting ejabberd startup errors on OSX

Posting in case anyone else falls into this pit:

Say you just installed ejabberd through Homebrew.
You happily go on to issue an ejabberdctl start command, and you get no feedback.
That’s normal, ejabberdctl is actually very laconic by nature.

Still, it looks like nothing happened, as you can’t see any new processes spawned.
You then tail /usr/local/var/log/ejabberd/ejabberd.log and it tells you that

E(:ejabberd_config:554) : Error reading Mnesia database spool files:
The Mnesia database couldn't read the spool file for the table 'config'.
ejabberd needs read and write access in the directory:
   /usr/local/var/lib/ejabberd
Maybe the problem is a change in the computer hostname,
or a change in the Erlang node name, which is currently:
   ejabberd@localhost
Check the ejabberd guide for details about changing the
computer hostname or Erlang node name.

You try out a couple of Googles on that error, and on the 10th hit you finally bump into the solution:
rm -rf /usr/local/var/lib/ejabberd/*

This basically removes the existing Mnesia database, forcing the software to create a new one on the next startup.
The reason the whole thing happened seems to have something to do with machine names, and how the internal database is bound to them.

Categories: Tricks.

Tags: ,

Comment Feed

2 Responses

  1. Works :) Thanks :)

  2. Thanks !



Some HTML is OK

or, reply to this post via trackback.