Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have ejabberd set up, and if I run ejabberd via command line, it executes fine, I can connect, chat with other people, etc.

When I run

service ejabberd start

everything executes properly, but the service does not launch.

When I run

ejabberdctl start

ejabberd says the node is down and doesn't supply any more information.

When I run

serivce ejabberd live

I actually get some output! Here's what I got...

Erlang R15B01 (erts-5.9.1) [source] [64-bit] [async-threads:0] [kernel-poll:false]

Eshell V5.9.1  (abort with ^G)
(ejabberd@gcmysql)1> Mnesia(ejabberd@gcmysql): Data may be missing, Corrupt logfile     deleted: "/var/lib/ejabberd/LATEST.LOG", {file_error,
                                                                                                             "/var/lib/ejabberd/LATEST.LOG",
                                                                                                     eacces}

=ERROR REPORT==== 30-Jan-2013::12:51:30 ===
Mnesia(ejabberd@gcmysql): ** ERROR ** (core dumped to file: "/var/lib/ejabberd/MnesiaCore.ejabberd@gcmysql_1359_568290_621095")
 ** FATAL ** {error,{"Cannot open dets table",offline_msg,
                 [{file,"/var/lib/ejabberd/offline_msg.DAT"},
                  {type,bag},
                  {keypos,2},
                  {repair,true}],
                 {file_error,"/var/lib/ejabberd/offline_msg.DAT",eacces}}}

=ERROR REPORT==== 30-Jan-2013::12:51:40 ===
Mnesia(ejabberd@gcmysql): ** ERROR ** mnesia_event got unexpected event: {'EXIT',
                                                                      <0.67.0>,
                                                                      killed}

=INFO REPORT==== 30-Jan-2013::12:51:40 ===
application: mnesia
exited: killed
type: permanent
{error_logger,{{2013,1,30},{12,51,41}},crash_report,[[{initial_call,{application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}},{pid,<0.39.0>},{registered_name,[]},{error_info,{exit,{bad_return,{{ejabberd_app,start,[normal,[]]},{'EXIT',{"{application_terminated,mnesia,killed}",{gen_server,call,[application_controller,{load_application,crypto},infinity]}}}}},[{application_master,init,4,[{file,"application_master.erl"},{line,138}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},{ancestors,[<0.38.0>]},{messages,[{'EXIT',<0.40.0>,normal}]},{links,[<0.38.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,24},{reductions,153}],[]]}
{"Kernel pid terminated",application_controller,"{application_terminated,mnesia,killed}"}

Crash dump was written to: /var/log/ejabberd/erl_crash.dump
Kernel pid terminated (application_controller) ({application_terminated,mnesia,killed})

I've been racking my brain for a week now and am getting nowhere. Please help!

UPDATE: Just throwing this out there. I have been running the above commands as root, since my local user doesn't have access to launch them. Is it possible that the mnesia database (file?) is modded root:root?

share|improve this question
up vote 2 down vote accepted

After running

find / -name ejabberd

I came across /var/lib/ejabberd. CD'd into the directory, found that the mnesia files were modded to root. Re-modded the files to ejabberd:ejabberd, ran

service ejabbered start

and it started up no problem. After a reboot, the service resumed as normal.

Hopefully this will stay up so anyone that runs into weird node down issues will find this and figure out what's going on.

share|improve this answer
    
Why not accept your answer? Question as well as answer are very valid and accepting your own answer has "been encouraged since the very beginning of time"! – zb226 Jan 13 at 17:00
1  
Because there's a delay on when you can accept your answer, and I completely forgot about this thread. Nice 2yr necro though! – GameCharmer Jan 13 at 20:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .