Clustering

Team

we have one e-jabber server already configured and i would like to configure two more e-jabber server, i would like to know the steps and requirement.

Thanks and waiting for your reply

Setting up ejabberd

Setting up ejabberd clustering
Machine 1:
1. Install ejabberd as a cluster node on machine 1 (Node name: ejabberd@PrasadK)
2. Configure it to use mysql database based on the installation guide.
3. Started the server using windows services. (You can alternatively start it from command line using $ejabberd-installation/bin/ejabberdctl start)

Machine 2:
1. Install ejabberd as a cluster node on machine 2 (Nodename: ejabberd@riktam-acb56375)
2. Configure it to use mysql database (the same server which the first machine's ejabberd server is connected to)
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)
4. Execute the command from $ejabberd-installation/bin/ directory
D:\ejabberd\bin>erl -sname ejabberd@riktam-acb56375 -mnesia extra_db_nodes "['ejabberd@PrasadK']" -s mnesia
5. Executing the above command should enter into erlang shell which looks like:
Eshell V5.6.4 (abort with ^G)
(ejabberd@riktam-acb56375)1>

a) execute mnesia:info(). to check if the two nodes are shown in running_nodes. If not check your ejabberd.log file:
(ejabberd@riktam-acb56375)1>mnesia:info().
---> Processes holding locks <---
---> Processes waiting for locks <---
---> Participant transactions <---
---> Coordinator transactions <---
---> Uncertain transactions <---
---> Active tables <---
schema : with 29 records occupying 3580 words of mem
===> System info in version "4.4.5", debug level = none <===
opt_disc. Directory "d:/ejabberd/bin/Mnesia.ejabberd@riktam-acb56375" is NOT use
d.
use fallback at restart = false
running db nodes = [ejabberd@PrasadK,'ejabberd@riktam-acb56375']
stopped db nodes = []
master node tables = []
remote = [acl,caps_features,captcha,config,http_bind,iq_response,
irc_custom,local_config,mod_register_ip,motd,motd_users,
muc_online_room,muc_registered,muc_room,passwd,
pubsub_index,pubsub_item,pubsub_last_item,pubsub_state,
pubsub_subscription,reg_users_counter,route,s2s,session,
session_counter,sql_pool,sr_group,sr_user]
ram_copies = [schema]
disc_copies = []
disc_only_copies = []
[] = [sql_pool,local_config,caps_features,mod_register_ip]
[{ejabberd@PrasadK,disc_copies}] = [config,pubsub_subscription,passwd,
irc_custom,sr_user,motd,acl,pubsub_index,
sr_group,motd_users,muc_room,pubsub_state,
muc_registered]
[{ejabberd@PrasadK,disc_copies},{'ejabberd@riktam-acb56375',ram_copies}] = [sche
ma]
[{ejabberd@PrasadK,disc_only_copies}] = [pubsub_item]
[{ejabberd@PrasadK,ram_copies}] = [http_bind,reg_users_counter,
pubsub_last_item,route,s2s,captcha,
session_counter,session,iq_response,
muc_online_room]
3 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

b) Now run the following in the same `erl' session:
(ejabberd@riktam-acb56375)2> mnesia:change_table_copy_type(schema, node(), disc_copies).

c) Now you can add replicas of various tables to this node with `mnesia:add_table_copy'
or `mnesia:change_table_copy_type' as above (just replace `schema' with another table
name and `disc_copies' can be replaced with `ram_copies' or `disc_only_copies').

d) Run `init:stop().' or just `q().' to exit from the Erlang shell. This probably can take
some time if Mnesia has not yet transfered and processed all data it needed from first.

6) Replace the newly created Db folder with the actual DB folder in (D:\ejabberd\database)

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

trying with these steps when i execute the 5th step there is no reaction in mensia tabel please advice

Syndicate content