I'm trying to set up an Accumulo cluster that uses a separate ZooKeeper cluster. I've configured the accumulo-site.xml file to include the instance.zookeeper.host property with the hostname or IP address of my ZooKeeper nodes, but when I try to initialize Accumulo with the accumulo init command, I get the following error message:ZOOKEEPER_HOME is not set or is not a directory. Please make sure it's set globally or in conf/accumulo-env.sh.
I've verified that the ZooKeeper client is installed on the Accumulo nodes and that it is configured correctly, and I've checked the network connectivity between the nodes. I'm sure that I've set the instance.zookeeper.host property correctly in the accumulo-site.xml .file
What could be causing this error, and how can I resolve it?
Accumulo error: "ZOOKEEPER_HOME is not set or is not a directory" with separate ZooKeeper cluster
58 views Asked by Felhi Rihab At
1
It would help to know what version of Accumulo and ZooKeeper you're using. Based on the error message, I'm guessing Accumulo is 1.x (hopefully, the latest 1.x, which is currently 1.10.3, since all earlier versions are obsoleted by the latest).
Explanation of the Error message
Apache Accumulo typically is bundled with all of its dependencies except Apache Hadoop and Apache ZooKeeper, which are expected to be provided by the user separately. Setting the
instance.zookeeper.hostproperty is needed to ensure that Accumulo knows where ZooKeeper is running, so it can talk to it. However, before you get to that point, you need to ensure that all of Accumulo's dependencies are on itsCLASSPATH, so it can use the ZooKeeper client code in ZooKeeper's own jars to communicate with it.The default scripts that come with Accumulo use an environment script,
conf/accumulo-env.sh, that help configure itsCLASSPATH, so that all the dependencies are available to it when an Accumulo process starts. This script adds jars from Accumulo's ownlib/directory to theCLASSPATH, for the dependencies that come bundled, and also tries to locate Hadoop and ZooKeeper to add those to theCLASSPATHby detecting them at their installed locations,HADOOP_HOMEandZOOKEEPER_HOME.How to Fix it
To fix this issue, you need to set
ZOOKEEPER_HOMEto point to the location where ZooKeeper is installed, or you need to edit theconf/accumulo-env.shscript to put the ZooKeeper jars on theCLASSPATHanother way.Accumulo 1.10 assumes you are using ZooKeeper 3.4, which included its jars in different locations than newer versions of ZooKeeper. You may need to add
$ZOOKEEPER_HOME/libto theCLASSPATHinstead of, or in addition to,$ZOO_KEEPER_HOME, depending on your version of ZooKeeper.This is just general information. To get details on your specific situation, the best thing to do is contact the Accumulo user mailing list for additional help/advice.