Newbie Question Mnesia nonode@nohost, can't seem to register users

I'm running ejabberd on knoppix, ejabberd itself seems to be fine, but I suspect I haven't correctly configured Mnesia. I get a not allowed error when trying to register, and mnesia:info() . produces this:

1> mnesia:info() .
===> System info in version {mnesia_not_loaded,
                                nonode@nohost,
                                {1175,107141,362845}}, debug level = none <===
opt_disc. Directory "/root/Mnesia.nonode@nohost" is used.
use fallback at restart = false
running db nodes   = []
stopped db nodes   = [nonode@nohost]

I've been fighting with the installation for far too long now, and it's so close to working, but I can't seem to find information about configureing Mnesia for ejabberd. I had assumed that ejabberd would do that itself, I guess, since that's the default.

Thanks.

ejabberd should handle mnesia itself

Yes, ejabberd should handle mnesia itself automatically. The only thing the administrator must do is create a dir for the Mnesia spool files, and put him right read/write rights.

ejabberd should start mnesia himself. If I start ejabberd on live mode (without -detached option), I can execute commands. As you can see, Mnesia is started:

(eja3@atenea)1> mnesia:info().
---> Processes holding locks <---
---> Processes waiting for locks <---
---> Participant transactions <---
---> Coordinator transactions <---
---> Uncertain transactions <---
---> Active tables <---
local_config   : with 16       records occupying 1941     words of mem
config         : with 13       records occupying 565      words of mem
privacy        : with 2        records occupying 838      words of mem
passwd         : with 2        records occupying 393      words of mem
irc_custom     : with 0        records occupying 279      words of mem
roster         : with 0        records occupying 279      words of mem
...

However, if I start an Erlang node and make the same command, it will fail. I must first start Mnesia (as ejabberd itself does):

$ erl
Eshell V5.5.4  (abort with ^G)
1> mnesia:info().
===> System info in version {mnesia_not_loaded,
                                nonode@nohost,
                                {1176,642167,688714}}, debug level = none <===
opt_disc. Directory "/home/bernar/insta/ejabberd/Mnesia.nonode@nohost" is NOT used.
use fallback at restart = false
running db nodes   = []
stopped db nodes   = [nonode@nohost]
ok
2> mnesia:start().
ok
3> mnesia:info().
---> Processes holding locks <---
---> Processes waiting for locks <---
---> Participant transactions <---
---> Coordinator transactions <---
---> Uncertain transactions <---
---> Active tables <---
schema         : with 1        records occupying 388      words of mem
===> System info in version "4.3.4", debug level = none <===
opt_disc. Directory "/home/bernar/insta/ejabberd/Mnesia.nonode@nohost" is NOT used.
use fallback at restart = false
running db nodes   = [nonode@nohost]
stopped db nodes   = []
master node tables = []
remote             = []
ram_copies         = [schema]
disc_copies        = []
disc_only_copies   = []
[{nonode@nohost,ram_copies}] = [schema]
2 transactions committed, 0 aborted, 0 restarted, 0 logged to disc
0 held locks, 0 in queue; 0 local transactions, 0 remote
0 transactions waits for other nodes: []
ok

Some hints you can try:

  • Verify that the Mnesia libraries were compiled/installed on your system. If they weren't you should probably notice on ejabberd log files.
  • Remove old contents of the Mnesia spool and let ejabberd recreate them again from scratch.
  • Make sure ejabberd has rights to read/write on Mnesia spool file. ejabberd log files should indicate if this is your problem.
Syndicate content