Installing a ZooKeeper node
ZooKeeper installation is supported on Linux® platform only.
Before you install a ZooKeeper node, complete the following steps:
- Complete your topology and installation planning and keep it ready for reference. For more information on topology planning, see Planning the topology and Planning for installation.
- Complete the worksheet for ZooKeeper and Cassandra installation. For more information, see Installation checklist: Cassandra and ZooKeeper.
- Install IBM® JDK and set the appropriate path. For more information, see Setting Java variables on Linux.
- Download Sterling B2B Integrator V6.0 media package from IBM Fix Central or IBM Passport Advantage.
- Extract the package to a folder, go to the media directory and locate the following files:
- IM_Linux.zip in the InstallationManager folder
- Extract the files to a common directory. After you extract the files, the directory must have
the following subdirectories:
- Default port numbers are assigned to various ports that the ZooKeeper utilities use. If you do not intend to use the default port numbers, keep the custom port numbers handy. Enter the port numbers when you define the ZooKeeper topology.
- Install an appropriate windowing system to view the IBM Installation Manager user interface on the Linux system.
- Set the shell LANG variable as appropriate and export the variable. For
example in sh, ksh or bash:
For example in csh:
LANG=en_US; export LANG
The LANG environment variable must be the same across all Cassandra and ZooKeeper nodes.
setenv LANG en_US
You must define all the ZooKeeper nodes that are required in all your data centers when installing each ZooKeeper node. However, you must install each node separately on the required system.
Attention: You can install Cassandra and ZooKeeper on a single node at the same time, for which you must choose both Global Mailbox Cassandra Node and Global Mailbox Zookeeper Node options. However, you must not install multiple instances of Cassandra and ZooKeeper on the same server.
To install a single ZooKeeper node on a Linux system, complete the following steps:
Open a command prompt and complete one of the following tasks to start the Installation
Go to the IM_Linux directory and type ./userinst for
the following scenarios:
- If you do not have the Installation Manager installed and are using the Installation Manager agent provided with V6.0.
- If you have a 64-bit Installation Manager installed.
- If you have the Installation Manager installed on a platform that has only one download available for Installation Manager. For example, AIX, Solaris, HP, zLinux.
- Go to <installation directory>/Installation Manager/eclipse and type ./IBMIM, if you have a 32-bit Installation Manager installed on a Linux system.
- Go to the IM_Linux directory and type ./userinst for the following scenarios:
On the Installation Manager home page, click Install.
Important: If IM_Linux, gmrepo, and b2birepo directories are not in the same directory or if you have already installed Installation Manager, a message is displayed that there are no packages to be installed or that Installation Manager could not connect to the repositories. You must add the Global Mailbox and Sterling B2B Integrator repository files to the Installation Manager repository. For more information about adding repository files, see Repository preferences.
- On the Install Packages screen, select the Global Mailbox check box. This action selects the Version 6.0 check box also. Click Next.
Click Browse and specify the installation directory for Global Mailbox. This directory is specific to the Global Mailbox components. You can choose to retain the
default or change it. Click Next.
Important: If you are running IBM Installation Manager for the first time, you must specify the shared resource directory for the Installation Manager. Click Browse and specify the shared resources directory and click Next.
- Select the translation (language) to install and click Next. Only English translation is supported in the first release of Global Mailbox.
Select the Global Mailbox Prerequisite Installation check box and select
Global Mailbox Zookeeper Node. Click Next.
Important: To install the Cassandra node along with the Zookeeper node, select Global Mailbox Cassandra Node also.
- Specify the Java™ home path for the Zookeeper node. Click Browse, navigate to the location of the Java folder, select it, and click Next.
Complete the following steps to specify the topology for the Zookeeper
Important: It is suggested to use the default ports. If you are not using the default ports, the ZooKeeper utilities that use the ports must be started with a command line argument to provide the correct port number.
Type the ZooKeeper host name or IP address in the ZooKeeper Host Name
The follow port (2888) and the election port (3888) are populated by default in the Follow Port and Election Port fields. In a ZooKeeper ensemble, the follower opens the TCP connection to the leader port by using the follow port. The election port is the leader port, which accepts the client connection.
Click Add to add the node.
Repeat the steps to define other ZooKeeper nodes. To remove a node, select the node and click Remove. The remove option removes the selected node from the topology.
- Type the ZooKeeper host name or IP address in the ZooKeeper Host Name field.
- Click Continue to Step 2.
Complete the following steps to define the local Zookeeper node:
Click Select Node and select the local ZooKeeper node that must be
The client port is populated by default in the Client Port field. Client port is the port where a client connects to the ZooKeeper node. The default port is 2181.
Select a data directory for the Zookeeper node.
Ensure the directory for the Zookeeper node and Cassandra node are not on the same physical I/O device. Co-locating the directories might lead to performance issues.
- Click Next.
- Click Select Node and select the local ZooKeeper node that must be installed.
- Click Install.
- Review the installation summary. Notice the installation progress in the Repository Information section.
Click Finish to complete the installation.
Important: Ignore the warning messages in the Installation Manager log files.
To start the ZooKeeper node, go to <installDir>/MailboxUtilities/bin/
and run the ./startGMCoordinate.sh script.
Important: You must run the ./startGMCoordinate.sh script for every ZooKeeper node. If you installed Cassandra and ZooKeeper nodes together, then you can use the ./startGM.sh script to start both the nodes together. When you run the ./startGM.sh script, the Cassandra node is started first, followed by the ZooKeeper node.
Repeat the procedure to install additional ZooKeeper nodes in the current and other data centers.Important: When a ZooKeeper node is installed, the ZooKeeper watchdog process is also deployed. ZooKeeper watchdog monitors the health of the Apache ZooKeeper ensemble, and when quorum is lost, it restarts the ZooKeeper process with a reduced ensemble of the surviving nodes, thereby restoring the quorum. The watchdog is started when you run the startGM.sh script in the <install_Dir>/MailboxUtilities/bin directory. In case you need to exclusively start or stop the watchdog process, you must run the startGMCoordinateWatchdog.sh and stopGMCoordinateWatchdog.sh scripts in the <install_Dir>/MailboxUtilities/bin directory.