ejabberd - Comments for "Clustering" https://www.ejabberd.im/node/5669 en Setting up ejabberd https://www.ejabberd.im/node/5669#comment-58966 <p>Setting up ejabberd clustering<br /> Machine 1:<br /> 1. Install ejabberd as a cluster node on machine 1 (Node name: ejabberd@PrasadK)<br /> 2. Configure it to use mysql database based on the installation guide.<br /> 3. Started the server using windows services. (You can alternatively start it from command line using $ejabberd-installation/bin/ejabberdctl start)</p> <p>Machine 2:<br /> 1. Install ejabberd as a cluster node on machine 2 (Nodename: ejabberd@riktam-acb56375)<br /> 2. Configure it to use mysql database (the same server which the first machine's ejabberd server is connected to)<br /> 3. Copy the .erlang.cookie file (which resides in C:/Windows folder if it's started as a service or $USER_HOME folder if it's started via command line) from the machine 1 to the machine 2's home folder. (I copied it in two places - in bin folder where erl command is executed and the user's home folder. Need to confirm which of them is used)<br /> 4. Execute the command from $ejabberd-installation/bin/ directory<br /> D:\ejabberd\bin&gt;erl -sname ejabberd@riktam-acb56375 -mnesia extra_db_nodes "['ejabberd@PrasadK']" -s mnesia<br /> 5. Executing the above command should enter into erlang shell which looks like:<br /> Eshell V5.6.4 (abort with ^G)<br /> (ejabberd@riktam-acb56375)1&gt; </p> <p> a) execute mnesia:info(). to check if the two nodes are shown in running_nodes. If not check your ejabberd.log file:<br /> (ejabberd@riktam-acb56375)1&gt;mnesia:info().<br /> ---&gt; Processes holding locks &lt;---<br /> ---&gt; Processes waiting for locks &lt;---<br /> ---&gt; Participant transactions &lt;---<br /> ---&gt; Coordinator transactions &lt;---<br /> ---&gt; Uncertain transactions &lt;---<br /> ---&gt; Active tables &lt;---<br /> schema : with 29 records occupying 3580 words of mem<br /> ===&gt; System info in version "4.4.5", debug level = none &lt;===<br /> opt_disc. Directory "d:/ejabberd/bin/Mnesia.ejabberd@riktam-acb56375" is NOT use<br /> d.<br /> use fallback at restart = false<br /> running db nodes = [ejabberd@PrasadK,'ejabberd@riktam-acb56375']<br /> stopped db nodes = []<br /> master node tables = []<br /> remote = [acl,caps_features,captcha,config,http_bind,iq_response,<br /> irc_custom,local_config,mod_register_ip,motd,motd_users,<br /> muc_online_room,muc_registered,muc_room,passwd,<br /> pubsub_index,pubsub_item,pubsub_last_item,pubsub_state,<br /> pubsub_subscription,reg_users_counter,route,s2s,session,<br /> session_counter,sql_pool,sr_group,sr_user]<br /> ram_copies = [schema]<br /> disc_copies = []<br /> disc_only_copies = []<br /> [] = [sql_pool,local_config,caps_features,mod_register_ip]<br /> [{ejabberd@PrasadK,disc_copies}] = [config,pubsub_subscription,passwd,<br /> irc_custom,sr_user,motd,acl,pubsub_index,<br /> sr_group,motd_users,muc_room,pubsub_state,<br /> muc_registered]<br /> [{ejabberd@PrasadK,disc_copies},{'ejabberd@riktam-acb56375',ram_copies}] = [sche<br /> ma]<br /> [{ejabberd@PrasadK,disc_only_copies}] = [pubsub_item]<br /> [{ejabberd@PrasadK,ram_copies}] = [http_bind,reg_users_counter,<br /> pubsub_last_item,route,s2s,captcha,<br /> session_counter,session,iq_response,<br /> muc_online_room]<br /> 3 transactions committed, 0 aborted, 0 restarted, 0 logged to disc<br /> 0 held locks, 0 in queue; 0 local transactions, 0 remote<br /> 0 transactions waits for other nodes: []<br /> ok</p> <p>b) Now run the following in the same `erl' session:<br /> (ejabberd@riktam-acb56375)2&gt; mnesia:change_table_copy_type(schema, node(), disc_copies).</p> <p>c) Now you can add replicas of various tables to this node with `mnesia:add_table_copy'<br /> or `mnesia:change_table_copy_type' as above (just replace `schema' with another table<br /> name and `disc_copies' can be replaced with `ram_copies' or `disc_only_copies').</p> <p>d) Run `init:stop().' or just `q().' to exit from the Erlang shell. This probably can take<br /> some time if Mnesia has not yet transfered and processed all data it needed from first.</p> <p>6) Replace the newly created Db folder with the actual DB folder in (D:\ejabberd\database) </p> <p>7) Change http_bind storage type to RAM and disc copy from Remote copy (Need to check whether it can be done in step 5.c. itsel</p> <p>trying with these steps when i execute the 5th step there is no reaction in mensia tabel please advice</p> Wed, 08 Aug 2012 20:01:43 +0000 dinulike comment 58966 at https://www.ejabberd.im