{badmatch, {aborted,{no_exists, acl}}}

Error

I have a laptop that changes hostnames as I move it around to different networks. My current host name is different than the one under which I created the databases. When I start ejabberd on another network, it crashes and outputs this error:

...{badmatch, {aborted,{no_exists, acl}}}...

I could remove the database and start with an empty database, but I would prefer to not do that frequently. Any suggestions for how ejabberd can start up, no matter what the current host name is?

Explanation

Several things together cause that error:

  • Mnesia stores the Erlang node name in the ejabberd database.
  • If the node name stored in the database is not equal to the current Erlang node name, Mnesia refuses to start.
  • If you do not specify the complete node name, Erlang will set it using the current host name.

Solution

Use this command line option when starting ejabberd:

erl -sname foobar@localhost ...

In this way the Erlang node will always have the same node name.

Syndicate content