ejabberd - Comments for "Failure on acl after hostname change" https://www.ejabberd.im/node/382 en ejabberd is based on the https://www.ejabberd.im/node/382#comment-42126 <p>ejabberd is based on the distributed Mnesia database. Being distributed, Mnesia enforce consistency of its file and store the name of the Erlang node in it.<br /> If you need to change the name of the Erlang node, you need to export / import the database on a fresh new data structure.</p> <p>--<br /> Mickaël Rémond<br /> <noindex><a href="http://www.process-one.net/" rel="nofollow" >Process-one</a></noindex></p> Mon, 13 Aug 2007 08:19:03 +0000 mremond comment 42126 at https://www.ejabberd.im There may be other ways, but https://www.ejabberd.im/node/382#comment-42106 <p><em>There may be other ways, but this one is quite simple: stop ejabberd, delete the mnesia spool dir on disk, start ejabberd. The tables will be regenerated</em></p> <p>I had the same problem on Ubuntu 7.04 (feisty). After renaming the host name, ejabberd refused to restart.</p> <p>I stopped ejabberd; <code>/etc/init.d/ejabberd stop</code> <strong>was not</strong> enough, I also had to manually kill <code>epmd</code> and <code>beam</code>.</p> <p>Removed <code>/var/lib/ejabberd/*</code></p> <p>Then started back ejabberd: <code>/etc/init.d/ejabberd start</code></p> <p>Everything ok.</p> Sun, 12 Aug 2007 16:02:40 +0000 andrew comment 42106 at https://www.ejabberd.im Correcting permissions fixed the problem https://www.ejabberd.im/node/382#comment-798 <p>That was the problem. The jabber user needed to be a member of group 'wheel' and the spool directory made group writable. I'm not sure if this violates any FreeBSD security standards or not. I'll look more closely at the issue later.</p> Tue, 13 Sep 2005 06:28:21 +0000 James Bowery comment 798 at https://www.ejabberd.im Other possible reason: Mnesia dir not writeable On an https://www.ejabberd.im/node/382#comment-797 <p>I make an experiment: <ul> <li>On an Erlang node with ejabberd running correctly, I get the expected response: <pre>(ejabberd2@atenea)2> mnesia:dirty_all_keys(acl). [{local,global},{badlop1,global},{admin,global}]</pre> </li><li>But on an Erlang node without ejabberd, without Mnesia and without the 'acl' Mnesia table: <pre>$ erl Erlang (BEAM) emulator version 5.4.9 [source] [hipe] [kernel-poll] Eshell V5.4.9 (abort with ^G) 1> mnesia:dirty_all_keys(acl). ** exited: {aborted,{no_exists,acl}} ** 2></pre> </li></ul> </p> <p>In this case, the 'acl' table does not exists because Mnesia was not started. If you remove the Mnesia spool dir, the tables should be created at the very beginning of ejabberd start. Check the permissions to read, write and execute that directory: maybe Erlang can't write the required Mnesia backup files there.</p> Mon, 12 Sep 2005 21:02:27 +0000 mfoss comment 797 at https://www.ejabberd.im Same failure after rm -rf /var/spool/ejabberd https://www.ejabberd.im/node/382#comment-796 <p>I got the same "no_exists,acl" error after the following commands (sh -x to echo the commands being executed):</p> <p>root@teamtibet /var/spool : rm -rf ejabberd<br /> root@teamtibet /var/spool : cd ~ejabberd<br /> root@teamtibet ~ejabberd : ls<br /> .erlang.cookie<br /> root@teamtibet ~ejabberd : pwd<br /> /usr/home/ejabberd<br /> root@teamtibet ~ejabberd : /usr/local/etc/rc.d/ejabberd.sh start<br /> + PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin<br /> + EJABBERD=/usr/local/bin/ejabberd<br /> + EJABBERDCTL=/usr/local/bin/ejabberdctl<br /> + EJABBERDUSER=ejabberd<br /> + NAME=ejabberd<br /> + DESC=ejabberd<br /> + test -f /usr/local/bin/ejabberd<br /> + test -f /usr/local/bin/ejabberdctl<br /> + [ -f /usr/local/etc/ejabberd.defaults ]<br /> + . /usr/local/etc/ejabberd.defaults<br /> + set -e<br /> + echo -n Starting ejabberd:<br /> Starting ejabberd: + status<br /> + hostname -s<br /> + su ejabberd -c /usr/local/bin/ejabberdctl ejabberd@teamtibet status &gt;/dev/null<br /> + start<br /> + su ejabberd -c /usr/local/bin/ejabberd -noshell -detached<br /> + [ -r /var/run/ejabberd/.erlang.cookie ]<br /> + [ -f /usr/local/etc/ejabberd.defaults ]<br /> + . /usr/local/etc/ejabberd.defaults<br /> + CONFIG=/usr/local/etc/ejabberd.cfg<br /> + LOG=/var/log/ejabberd/ejabberd.log<br /> + SASL_LOG=/var/log/ejabberd/sasl.log<br /> + SPOOL=/var/spool/ejabberd<br /> + ARGS=<br /> + [ 2 -ne 0 ]<br /> + PARAM=-noshell<br /> + shift<br /> + ARGS= -noshell<br /> + [ 1 -ne 0 ]<br /> + PARAM=-detached<br /> + shift<br /> + ARGS= -noshell -detached<br /> + [ 0 -ne 0 ]<br /> + exec erl -sname ejabberd -s ejabberd -ejabberd config "/usr/local/etc/ejabberd.cfg" log_path "/var/log/ejabberd/ejabberd.log" -sasl sasl_error_logger {file,"/var/log/ejabberd/sasl.log"} -mnesia dir "/var/spool/ejabberd" -noshell -detached<br /> + echo ejabberd.<br /> ejabberd.<br /> + exit 0</p> Mon, 12 Sep 2005 16:38:22 +0000 James Bowery comment 796 at https://www.ejabberd.im Remove the mnesia spool dir https://www.ejabberd.im/node/382#comment-793 <p>There may be other ways, but this one is quite simple: stop ejabberd, delete the mnesia spool dir on disk, start ejabberd. The tables will be regenerated</p> Mon, 12 Sep 2005 07:12:59 +0000 mfoss comment 793 at https://www.ejabberd.im No joy... how do I re-init Mnesia? https://www.ejabberd.im/node/382#comment-792 <p>I tried the following -sname's without success:</p> <p>ejabberd@localhost<br /> ejabberd@oldhostname<br /> ejabberd@newhostname</p> <p>How do I reinitialize Mnesia so I can start over?<br /> (There were no registered users anyway.)</p> Mon, 12 Sep 2005 02:01:11 +0000 James Bowery comment 792 at https://www.ejabberd.im Check this page for a tip https://www.ejabberd.im/node/382#comment-790 <p>The error is similar or the same that <noindex><a href="/node/257" rel="nofollow" >this</a></noindex>. Try with different -sname values. If you find the solution, please post it here.</p> Sun, 11 Sep 2005 16:42:38 +0000 mfoss comment 790 at https://www.ejabberd.im