The deployment model of this scenario is as follows.
Figure: In-Built Cassandra and ZooKeeper Servers for all Broker Nodes.
|MB Server||IP Address|
|MB Server 01||192.168.0.100|
|MB Server 02||192.168.0.101|
|MB Server 03||192.168.0.102|
1. First, configure the HostName in $CARBON_HOME/repository/conf/carbon.xml file by specifying the ip of the host as follows. Configure this in all three servers.
2. Configure Cassandra servers in these MB servers to form a cassandra ring, by changing the following entries in $CARBON_HOME/repository/conf/etc/Cassandra.yaml.
3. Next, configure the ZooKeeper Servers to create a ring among all broker nodes, by adding client port address to $CARBON_HOME/repository/conf/etc/zoo.cfg. Note that we are disabling starting the Zookeeper server here by setting 'start_zk_server=false' as the server will be started internally by Message Broker at the broker start up.
After modifying, the file looks as follows.
4. The above zoo.cfg file is for server 192.168.0.101. Copy the same zoo.cfg file to other two servers and change the entry "clientPortAddress" to the ip of that particular server.
5. Create file "myid" in the data directory (repository/data/zookeeper) of each server and specify the id of the server in that file. For example, if the Id of the the server 192.168.0.100 is "1", have number 1 in that myid file.
For more information, refer to the zookeeper clustering setup guide: http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#sc_zkMulitServerSetup
6. You also need to setup "Zookeeper Server To Accept SASL Connections" for each Zookeeper server using the guide here .
7. Repeat the above configuration in each message broker server appropriately.
Do the following configuration changes in each Message Broker node.
7. Modify $CARBON_HOME/repository/conf/advanced/qpid-config.xml file as follows.
8.Then modify $CARBON_HOME/repository/conf/advanced/qpid-virtualhosts.xml file as follows.
9. Start all three Message Broker nodes.
When starting the Message Broker use the following command. This will disable ZooKeeper from registering Log4j MBeans to manage log4j through JMX.
sh wso2server.sh -Dzookeeper.jmx.log4j.disable=true