Score:0

Ejabberd won't start anymore

gr flag

I've had ejabberd running for several months with NO issues. In the last few days, it started to crash with out of memory errors in dmesg. Now, it simply won't start.

When I try to start it, I see this in the log:

2021-11-17 16:48:21.808 [notice] <0.120.0>@lager_file_backend:154 Changed loghwm of /opt/ejabberd/logs/ejabberd.log to 100
2021-11-17 16:48:22.043 [info] <0.106.0>@ejabberd_config:load:82 Loading configuration from /opt/ejabberd/conf/ejabberd.yml
2021-11-17 16:48:22.064 [notice] <0.120.0>@lager_file_backend:143 Changed loglevel of /opt/ejabberd/logs/ejabberd.log to debug
2021-11-17 16:48:22.138 [debug] <0.123.0>@lager_handler_watcher:127 Lager installed handler lager_backend_throttle into lager_event
2021-11-17 16:48:22.329 [info] <0.106.0>@ejabberd_config:load:89 Configuration loaded successfully
2021-11-17 16:48:22.474 [debug] <0.223.0>@ejabberd_mnesia:init:79 Waiting for Mnesia tables synchronization...

I'm running ejabberd-21.07.

Any suggestions for fixing this would be most welcome!

Mike.

Score:0
ru flag

Do you have a small or very big database? I mean, only a few thousand accounts, or millions of accounts? If it's a big database, it would be preferable to use SQL storage.

If it's a small database, maybe it got corrupted after a crash, or RAM or disk problem...

Right now, you can try to open the mnesia database and backup manually:

❯ erl -sname ejabberd@localhost -mnesia dir \"/usr/local/var/lib/ejabberd\"
Erlang/OTP 23 [erts-11.1.8] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]
Eshell V11.1.8  (abort with ^G)

(ejabberd@localhost)1> mnesia:start().
ok

(ejabberd@localhost)2> mnesia:info(). 
---> Active tables <--- 
mod_register_ip: with 0        records occupying 305      words of mem
...
roster         : with 0        records occupying 5464     bytes on disc
...
ok

(ejabberd@localhost)3> mnesia:backup("/tmp/aa.backup").
ok
gr flag
Hi, and thanks for getting back to me about this. I only have 6 users on this system. Here is the output of the commands you specified: https://pastebin.com/xGuK8QEh Let me know what you think.
Badlop avatar
ru flag
You should modify that command! Provide your existing mnesia dir path, so erlang tries to read the existing mnesia files :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.