Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My hosting provider WebFusion updated my VPS with security patches late last night.

Since then I cannot start my ejabberd instance. I get the following errors, which seem to indicate that the hostname has changed.

=ERROR REPORT==== 2010-11-29 23:01:10 ===
E(<0.35.0>:ejabberd_config:278) : Error reading Mnesia database spool files:
The Mnesia database couldn't read the spool file for the table 'acl'.
ejabberd needs read and write access in the directory:
   /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@lvps109-104-93-116'
Check the ejabberd guide for details about changing the
computer hostname or Erlang node name.


=INFO REPORT==== 2010-11-29 23:01:15 ===
application: ejabberd
exited: {bad_return,{{ejabberd_app,start,[normal,[]]},
             {'EXIT',"Error reading Mnesia database"}}}
type: temporary

Everything has been working a treat for many months and I have made no changes to the VPS configuration, which is based on Ubuntu 8.04 LTS by the way.

I have tried everything I could find on Google w.r.t recovering or migrating mnesia files in this type of scenario, but I cannot seem to get the instance started again. I cannot make a binary backup of the files and clean-slate the system since this relies on getting a running instance up before the backup can be completed. It looks like I am stumped and will have to write-off months of user account registrations.

My hostname does not appear to have changed with the patches and reboot that the hosting company performed. Honestly, I don't really know what hostname ejabberd is expecting but I know it is of the form ejabberd@. Is there a way I can determine this from the existing mnesia data files I wonder?

As for the technical support channels of WebFusion? They have told me in no uncertain terms that I am on-my-own and offered no support at all when questioned.

Would appreciate any guidance on how to extract the data from the mnesia data files in /var/lib/ejabberd and how to recover this or a new installation. I will consider moving to a new host or VPS if I have to.

Very many thanks in advance.

share|improve this question

2 Answers 2

  1. Stop ejabberd.

/etc/init.d/ejabberd stop

2.Kill processes: beam, beam.smp, epmd

killall ejabberd

killall beam

killall beam.smp

killall epmd

3.Remove the files in /var/lib/ejabberd (Create a backup copy of this folder just in case)

rm -rf /var/lib/ejabberd/*

rm -rf /var/lib/ejabberd/.erlang.cookie

4.Try to start ejabberd.

/etc/init.d/ejabberd start

share|improve this answer
up vote 1 down vote accepted

I ended up using ejabberdctl to get information about the underlying mnesia database.

Then set ERLANG_NODE within the file /etc/defaults/ejabberd to, in my case, ejabberd@vps. Et viola the service came up upon typing /etc/init.d/ejabberd start.

Upon startup the process reports failed after a period of 30 seconds. Yet I could access the web management interface and dump the database.

For future use, I shall be deployed to a new ejabberd+MySQL cluster and obviously leaving my current VPS provider.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.