Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

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.