Zookeeper install on CentOS 7

Good concise article here on devopscube for installing zookeeper cluster. I’ve added some of my own bits:

Firewall

Disable firewalld or allow ports 2181 3888 2888

Install Java

User

Create a zookeeper user

Install Zookeeper

Download ZooKeeper from the Apache:

Set the permissions:

Add the following:

Test the service:

Ctrl-c out of that and lets create a systemd unit file for the service.

Systemd

Add the following:

Next

Test

Running the following will give a client interface to the zookeeper service:

There are some examples here but you can create and get info as shown below:

To check which nodes are followers and which is the leader try issuing the following commands to each node:

There is excellent information on monitoring Zookeeper here (from ServerDenisty) and a Nagios check here.

Troubleshooting

  • Reset the user permissions on the /opt/zookeeper directory recursively
  • Switch off firewalld and/or check a telnet connect to port 2181 on each node
  • Try switching to the zookeeper user (su – zookeeper -s /bin/bash) and run the zkServer.sh start command

 

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">