ejabberd - Comments for "Cluster startup problems" https://www.ejabberd.im/node/2901 en fix for dc_im https://www.ejabberd.im/node/2901#comment-54472 <p>see <noindex><a href="http://tdewolf.blogspot.com/2009/07/clustering-ejabberd-nodes-using-mnesia.html" rel="nofollow" >this blog</a></noindex> to fix your issue. It is located in the section Set up the Second Node, <strong>step 7</strong>.</p> Mon, 20 Jul 2009 07:55:47 +0000 tdewolf comment 54472 at https://www.ejabberd.im Got it working https://www.ejabberd.im/node/2901#comment-52038 <p>The fundamental problem is that when you run the 'erl' command, it will create a new (as far as I understood) Mnesia database in the working directory. The name of the database-directory will be Mnesia.host@domain. When you start ejabberd it will try to use the database in the database directory, which is not the syncronized database. </p> <p>My suggestion as a the fix to the installation instructions:</p> <p>Do as told in the instructions, but after step 5 issue commands, where node@host is the database directory you have.</p> <p>rm -rf database/node@host<br /> mv Mnesia.node@host database/node@host</p> <p>The first command removes the non-syncronized database and the second command puts the synchronized database in place of the removed database.</p> <p>The fix even makes sense. The nicer fix would naturally be that the 'erl' command wouldn't create a new database, but update the existing. No idea how to do that.</p> <p>Thanks for help for all, I really spent a lot of time with this one. Hopefully the issue is now really fixed and no surprises will be found out later.</p> Thu, 20 Mar 2008 10:16:14 +0000 dc_im comment 52038 at https://www.ejabberd.im Couldn't reproduce the instructions https://www.ejabberd.im/node/2901#comment-52037 <div class="quote-msg"> <div class="quote-author"><em>steam</em> wrote:</div> <p>I fixed my own problem (had the exact same one).</p> <p>It seems that ejabberd does not find the appropriate database that<br /> ist created by the mnesia sync. Here is what i did: </p></div> <p>You mean, you did this _after_ making the steps mentioned in the installation guide?</p> <div class="quote-msg"> <div class="quote-author"><em>steam</em> wrote:</div> <p>1. cd /opt/ejabberd/bin/<br /> rm -rf Mnesia*</p> <p>2. cd ../databases/<br /> rm -rf *</p> <p>3. vim ../conf/ejabberdctl.cfg<br /> search for "database" and put a "Mnesia." in front of $ERLANG_NODE so<br /> it _exactly_ matches the name of your node (may have to edit some stuff<br /> at the beginning of the file to make $ERLANG_NODE represent the name) </p></div> <p>You mean there's a string database in the file? I don't see there the string.... So what do you put exactly in ERLANG_NDOE? If the line would be e.g. ejabberd@second, where do you exactly put "Mnesia."?</p> <div class="quote-msg"> <div class="quote-author"><em>steam</em> wrote:</div> <p>works! (for me at least)</p></div> <p>I couldn't reproduce, since I didn't get all your instructions. So, pls if you can be more exact, we could see that if your solution works also for me. I guess if it helps me, it'll help a lot of other ppl too.</p> <p>r,<br /> J</p> Thu, 20 Mar 2008 09:55:04 +0000 dc_im comment 52037 at https://www.ejabberd.im I fixed my own problem (had https://www.ejabberd.im/node/2901#comment-52026 <p>I fixed my own problem (had the exact same one).</p> <p>It seems that ejabberd does not find the appropriate database that<br /> ist created by the mnesia sync. Here is what i did:</p> <p>1. cd /opt/ejabberd/bin/<br /> rm -rf Mnesia*</p> <p>2. cd ../databases/<br /> rm -rf *</p> <p>3. vim ../conf/ejabberdctl.cfg<br /> search for "database" and put a "Mnesia." in front of $ERLANG_NODE so<br /> it _exactly_ matches the name of your node (may have to edit some stuff<br /> at the beginning of the file to make $ERLANG_NODE represent the name)</p> <p>4. (still in databases)<br /> ../bin/erl -name ejabberd@second -mnesia extra_db_nodes "['ejabberd@first']" -s mnesia<br /> mnesia:change_table_copy_type(schema, node(), disc_copies).<br /> It will say something about "already exists"...ignore that.<br /> q().</p> <p>5. cd ../bin/<br /> ./start</p> <p>works! (for me at least)</p> Wed, 19 Mar 2008 15:34:09 +0000 steam comment 52026 at https://www.ejabberd.im i just posted the _exakt_ https://www.ejabberd.im/node/2901#comment-52024 <p>i just posted the _exakt_ same problem <a href="http://www.ejabberd.im/node/2915">here</a>.<br /> unfortunately i have nothing to add to a soulution, just pointing<br /> you there in case someone gives an answer there...</p> Wed, 19 Mar 2008 13:15:05 +0000 Anonymous comment 52024 at https://www.ejabberd.im Cluster-nodes cannot see each other / node crashes at startup https://www.ejabberd.im/node/2901#comment-52023 <div class="quote-msg"> <div class="quote-author"><em>badlop</em> wrote:</div> <p>Any ejabberd server can be considered a cluster of just one node, right?</p></div> <p>Makes sense. Thanks for the clarification.</p> <div class="quote-msg"> <div class="quote-author"><em>badlop</em> wrote:</div> <p>The section '6.2 Clustering Setup' in the ejabberd Guide explains how to add more nodes to that existing cluster. So, that section starts saying:</p> <p>&gt; Suppose you already configured ejabberd on one machine named (first),<br /> &gt; and you need to setup another one to make an ejabberd cluster.</p> <p>If you take that consideration into account, you will agree that all the steps mentioned in the section are clearly to be performed in the second node.</p> <p>Finally, the Guide says:</p> <p>&gt; You can repeat these steps for other machines supposed to serve this domain.</p> <p>This means that you can add a third, a forth and more nodes to your existing cluster, following the same steps you followed to add the second node.</p> <p>As you have already tried those steps several times, you probably have noticed that setting an ejabberd cluster is just a matter of configuring the Mnesia database to replicate some tables across the nodes.</p></div> <p>The problem is that I don't have experience on setting up a Mnesia database replication. </p> <p>I still have the problem of Mnesia crashing. Here's the detailed description of the installation process:</p> <p>On first:</p> <p>Install from ejabberd-2.0.0-linux-x86-installer.bin, no special settings.<br /> Modify the file conf/ejabberdctl.cfg and set ERLANG_NODE=ejabberd@first<br /> bin/ejabberdctl start</p> <p>On second:</p> <p>Install from ejabberd-2.0.0-linux-x86-installer.bin, the same settings as in first.<br /> Modify the file conf/ejabberdctl.cfg and set ERLANG_NODE=ejabberd@second<br /> ./bin/erl -sname ejabberd -mnesia extra_db_nodes "['ejabberd@first']" -s mnesia -&gt; mnesia:info(). shows the both nodes<br /> mnesia:change_table_copy_type(schema, node(), disc_copies).<br /> init:stop().<br /> ./bin/ejabberdctl start</p> <p>Now on first I can see second in the nodes list, but as stopped node. In second I only can see the second (as running node). If I access first during the steps described above, during the "./bin/erl -sname ejabberd -mnesia..." command, I can see second as a running node. If I stop both nodes and start the node "second" first and then the node "first", the node "first" crashed immediatelly causing a file bin/ MnesiaCore.ejabberd@xyzzy (or similar).</p> Wed, 19 Mar 2008 13:10:36 +0000 dc_im comment 52023 at https://www.ejabberd.im An ejabberd server is already the first node in a cluster https://www.ejabberd.im/node/2901#comment-52013 <p>Any ejabberd server can be considered a cluster of just one node, right?</p> <p>The section '6.2 Clustering Setup' in the ejabberd Guide explains how to add more nodes to that existing cluster. So, that section starts saying:</p> <p>&gt; Suppose you already configured ejabberd on one machine named (first),<br /> &gt; and you need to setup another one to make an ejabberd cluster.</p> <p>If you take that consideration into account, you will agree that all the steps mentioned in the section are clearly to be performed in the second node.</p> <p>Finally, the Guide says:</p> <p>&gt; You can repeat these steps for other machines supposed to serve this domain.</p> <p>This means that you can add a third, a forth and more nodes to your existing cluster, following the same steps you followed to add the second node.</p> <p>As you have already tried those steps several times, you probably have noticed that setting an ejabberd cluster is just a matter of configuring the Mnesia database to replicate some tables across the nodes.</p> Wed, 19 Mar 2008 01:02:13 +0000 mfoss comment 52013 at https://www.ejabberd.im