Fusion 4.x.x Zookeeper Ensemble Setup
Configuration example
This example involves three servers:
-
host1.devin3.ss.com
-
host2.devin3.ss.com
-
host3.devin3.ss.com
The sample location for $FUSION
is /opt/lw/fusion/4.1.0
. The actual path is based on the installation location you select.
Required files
zoo.cfg
This file must be identical on all three servers. The location of the file is:
$FUSION/conf/zookeeper/zoo.cfg
-
Add the following after the clientPort entry:
-
server.1=host1.devin3.ss.com:2888:3888
-
server.2=host2.devin3.ss.com:2888:3888
-
server.3=host3.devin3.ss.com:2888:3888
-
-
Modify the dataDir entry to the following value:
dataDir=/opt/lw/fusion/4.1.0/data/zookeeper
-
Copy this file, or make the same changes, to all three servers.
fusion.properties
This file must be identical on all three servers. The location of the file is:
$FUSION/conf/fusion.properties
-
Remove the comment from the default.zk.connect entry and enter the following value:
default.zk.connect=host1.devin3.ss.com:9983,host2.devin3.ss.com:9983,host3.devin3.ss.com:9983
-
Modify the group.default entry to ensure the only value:
group.default = zookeeper
-
Copy this file, or make the same changes, to all three servers.
myid
The myid
file designates a specific Zookeeper service by ID number.
-
Create a
myid
file on the following server with the specified path:host1.devin3.ss.com: $FUSION/data/zookeeper/myid
Verify the only content in this myid file is the number 1. -
Create a
myid
file on the following server with the specified path:host2.devin3.ss.com: $FUSION/data/zookeeper/myid
Verify the only content in this myid file is the number 2. -
Create a
myid
file on the following server with the specified path:host3.devin3.ss.com: $FUSION/data/zookeeper/myid
Verify the only content in this myid file is the number 3.
Verify the Zookeeper ensemble configuration
-
Access the host1.devin3.ss.com server and navigate to the
dist
installation folder. -
Run the following command:
.fusion start
Verify the only service that executes is Zookeeper (based on the group.default entry in the fusion.properties
file.) -
Access the host2.devin3.ss.com server and navigate to the
dist
installation folder. -
Run the following command:
.fusion start
Verify the only service that executes is Zookeeper (based on the group.default entry in the fusion.properties
file.) -
Access the host3.devin3.ss.com server and navigate to the
dist
installation folder. -
Run the following command:
.fusion start
Verify the only service that executes is Zookeeper (based on the group.default entry in the fusion.properties
file.) -
Enter the following command on the host1.devin3.ss.com server to verify the status of the Zookeeper service:
echo stat | nc host1.devin3.ss.com 9983
The Zookeeper service must be running on all three servers to confirm the status of the service on any of the servers. The output of the command may contain a significant amount of information. Verify the mode value is leader. The mode value on the other two servers is follower.
-
Enter the following command on the host1.devin3.ss.com server to verify the status of the Zookeeper service:
echo stat | nc host2.devin3.ss.com 9983
-
Enter the following command on the host1.devin3.ss.com server to verify the status of the Zookeeper service:
echo stat | nc host3.devin3.ss.com 9983
-
Review the log files as needed. To review the log, enter:
tail -f /opt/lw/fusion/4.1.0/var/log/zookeeper/zookeeper.log