Cluster in Windows - how to?

How to setup EJabber cluster in Windows? Is it possible?

Like on other operating

Like on other operating systems. Probably yes.

Installation Document

The section to setup a cluster from the installation document works fine when done on Windows.

When starting the nodes as Windows services, make sure that -sname parameter is not in the "Args" key, but in "SName". Also ensure you don't have "-mnesia dir \"spool\"" in "Args".

These keys are in:
HKLM\SOFTWARE\Ericsson\Erlang\ErlSrv\1.1\ejabberd

Ok, thanks. But...

I am beginner in ejabber, this is my first installation. My english is poor, sorry, and i don`t understand some things in guide.

Help me step by step, ok?
Reading guide:
1. Copy ~ejabberd/.erlang.cookie file from first to second.
Where is that file?

Cluster Setup on Windows

If you start ejabber from the console, the ".erlang.cookie" file will be in the user directory of that user, i.e. "C:\Documents and Settings\username" If you start it as a service, it will be in "C:\WINDOWS".

• I suggest setting up the first node, and starting it as a service, remember setting the SName registry key to "ejabberd@first", where first is the name of the node.
• Copy ".erlang.cookie" from "C:\WINDOWS" on the first node to "C:\Documents and Settings\username" on the second node.
• Start ejabber as per the installation document, erl -sname ejabberd -mnesia extra_db_nodes "['ejabberd@first']" -s mnesia
• Check that both nodes is running in “mnesia:info().”, if not look for errors in “ejabberd.log” on the first node
• Continue with steps in the installation document.
• Set SName registry key to "ejabberd@second" on the second node.
• Copy ".erlang.cookie" from "C:\Documents and Settings\username" to "C:\WINDOWS".
• Start ejabberd as a service

I typed this as I remembered it from when I did the setup initially, hope I remembered everything. I should probably write it down next time I do this :)

Yesss!

All working fine! Thanks.

Ok, next question :)

I have a cluster with two nodes, they are: node1 and node2. User1 has been connected to node1, user2 connected to node2. There is a channel between two nodes which often fails. After the channel failure the user1 has access to user2 and is able to send him messages. After re-connection, the user2 don't receive any messages from user1 sent while channel disconnected. Besides, on re-connection nodes have no access to each other until reset one of it (restart service ejabber). What should be done for the messages to be received after channel re-connection/failure and the nodes to have access without reset function?

Please create a new thread on the forum

Since this question is not about 'Cluster in Windows - how to?', but general for ejabberd clustering, you should start a new thread on that forum.

Your question seems interesting not only to Windows users, but to anyone considering or using clustering.

Syndicate content