We have installed the ejabberd 1.1.3 on two ubuntu servers A and B. We installed mysql on one ubuntu server A and we configure the ejabberd.cfg of the server B to link to the database in server A. Now we have registed two users named test001@A and test002@B, we can also login test001@B and test002@A.
The problem is if we login the two user in the same server, everything is ok, but if we login the two user seperately, we can not chat with each other.
We think the reason is we don't configured the server cluster correctly. Are there anybody who can tell me how to cluster the two server??
thx a lot.
I think the Mnesia table
I think the Mnesia table 'session' is used by ejabberd to know if a user is logged, and where he is logged (at which node).
You can try to configure this table to be replicated. Check ejabberd guide, section 'clustering setup'.
Without the .erlang.cookie file
Without the .erlang.cookie file what shall we do with the first step in the Clustering Setup in ejabberd installation guide.
For we use the bin file to install the ejabberd, so we don't have the .erlang.cookie file in our ejabberd directory, badlop said in this condition our cookie is 'ejabberd'. Does it mean we do not need to copy the cookie file to the second server and we also do not need to add the '-cookie content_of_.erlang.cookie' option in our erl command.
without the first step 1, if we run the step 2 and running the 'mnesia:info().' command, we can not see the running db nodes = [ejabberd@first,ejabberd@second]
we only can see the running db nodes = [ejabberd@second]
the stop db nodes = [ejabberd@first]
what shall we do next
Are there anyone who can give us a detail guide step by step.
Thx a lot.
badlop help me.
Now we have install the ejabberd again with the bin file and do not use mysql.
but we still can not follow the installation guide.
After we use the 'sudo erl -sname ejabberd' command to enter the erlang shell, the command "erlang:get_cookie()." returns a string not "ejabberd".
but badlop you have said that if we use the bin file to install the ejabberd, the cookie should be "jeabberd". Are there anyother place where setcookie beside the ejabberdctl file?
We used mysql instead of
We used mysql instead of mnesia, so we can not find guide in ejabberd guide doc. I am wondering if we realy clustered these two server or just make them use the same database.
On your case, some tables
On your case, some tables are stored on the mysql db you configure on the ejabberd nodes. The rest of the tables are stored on mnesia. Some of those mnesia tables must be replicated on all nodes, for consistency reasons. Use the ejabberd guide to configure mnesia to replicate such tables.