ejabberd - Comments for "Cluster Node Replication" https://www.ejabberd.im/node/474 en OK I'm a little slow but I https://www.ejabberd.im/node/474#comment-1001 <p>OK I'm a little slow but I get it now. I point my second node at the created mnesia db and it works. This is awesome. I'll still need to clean this config up and package it to be deployed to my production hosts but at least it works and I finally get it.</p> <p>Thanks!</p> Fri, 04 Nov 2005 00:15:42 +0000 St0nkingByte comment 1001 at https://www.ejabberd.im My start script runs https://www.ejabberd.im/node/474#comment-995 <p>My start script runs ejabberdctl default start which does this:</p> <p>exec $BINDIR/erl -noinput -sname ejabberdctl@node1 -mnesia dir "\"${EJABBERD_DB}\"" -s ejabberd_ctl -extra $@</p> <p>$ROOTDIR/database/$1 maps to:</p> <p>/opt/ejabberd-0.9.8/database/default</p> <p>Which my user that I'm running as owns. That directory also contains all the table data files for ejabberd.</p> <p>I guess I'm still not clear on the whole mnesia thing. Is mnesia the database engine overall or is it what replicates the data? Should I have a seperate mnesia.default directory?</p> Thu, 03 Nov 2005 18:50:03 +0000 St0nkingByte comment 995 at https://www.ejabberd.im mnesia dir paramater https://www.ejabberd.im/node/474#comment-991 <p>Do you still have the "-mnesia dir \"spool\"" paramater in your startup script ? If so, try removing it or change to the new directory, wich will be mnesia.ejabberd@node2</p> Thu, 03 Nov 2005 12:01:46 +0000 tiaan comment 991 at https://www.ejabberd.im OK different questions now https://www.ejabberd.im/node/474#comment-977 <p>I discovered I had misnamed one of my nodes. calling it deafault instead of default. Which was why I was having so much trouble.</p> <p>Now I'm approaching having the two nodes replciate their data. Here's what I have so far.</p> <p>I've setup default@node1. It works fine. I run the following on node2</p> <p>erl -sname default -mnesia extra_db_nodes "['default@node1']" -s mnesia</p> <p>While this is running I can see default@node2 connected on the node status of node1. I can change the db settings and see stuff apparently replicating between the two. It looks happy so I close out the erl sesion on node2 with q(). and start node2 with the start script.</p> <p>Now node2 is up and on its node status page I just see default@node2. On node1 I see default@node1 running and default@node2 as down.</p> <p>How can I get the connection to be persistent on node2?</p> Wed, 02 Nov 2005 00:28:01 +0000 St0nkingByte comment 977 at https://www.ejabberd.im Of course as soon as I post... https://www.ejabberd.im/node/474#comment-976 <p>Of course as soon as I post I semi-answer my own question. I guess my problem is my ejabberd installation is called 'default'. When I try to connect as default I get the following:</p> <p>node1$ ./ejabberdctl default status<br /> Node 'default@node1' is started. Status: started</p> <p>node1$ ./erl -sname default -mnesia extra_db_nodes "['default@node2']" -s mnesia<br /> {error_logger,{{2005,11,1},{10,3,55}},'Protocol: ~p: register error: ~p~n',[inet_tcp,{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1}, {net_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2}, {net_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}]}<br /> {error_logger,{{2005,11,1},{10,3,55}},crash_report,[[{pid,&lt;0.19.0&gt;}, {registered_name,net_kernel},{error_info,{error,badarg}},{initial_call,{gen,init_it,...<br /> {error_logger,{{2005,11,1},{10,3,55}},supervisor_report,[{supervisor,{local,net_sup}}, {errorContext,start_error},{reason,{'EXIT',nodistribution}}, {offender,[{pid,undefined},{name,net_kernel},...<br /> {error_logger,{{2005,11,1},{10,3,55}},supervisor_report,[{supervisor,{local,kernel_sup}}, {errorContext,start_error},{reason,shutdown},{offender, [{pid,undefined},{name,net_sup},{mfa,{erl_distribution,start_link,[]}},...<br /> {error_logger,{{2005,11,1},{10,3,55}},crash_report,[[{pid,&lt;0.7.0&gt;},...<br /> {error_logger,{{2005,11,1},{10,3,55}},std_info,[{application,kernel},{exited,{shutdown, {kernel,start,[normal,[]]}}},{type,permanent}]}<br /> {"Kernel pid terminated",application_controller,shutdown}</p> <p>Crash dump was written to: erl_crash.dump<br /> Kernel pid terminated (application_controller) (shutdown)</p> Tue, 01 Nov 2005 18:07:48 +0000 St0nkingByte comment 976 at https://www.ejabberd.im