I have installed zookeeper 3.4.9 version
and my zoo.cfg
file configuration is as following
initLimit=10
syncLimit=5
dataDir=/usr/local/zookeeper/
clientPort=2181
DataLogDir=/usr/local/log/
server.1=hadoop-master:2888:3888
server.2=hadoop-slave-1:2889:3889
server.3=hadoop-slave-2:2890:3890
and ofcourse I have initiated myid
file under /usr/local/zookeeper/data/myid
in three nodes
and it contains the value 1 in hadoop-master server and 2 in hadoop-slave-1
and 3 in hadoop-slave-2
my slaves file is as following
hadoop-slave-1
hadoop-slave-2
hadoop-master
i have issued the command ./zkServer.sh start
in all three nodes
and it gives me the out put
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper-3.4.9/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
but issuing the command ./zkServer.sh status
gives me the output
Using config: /usr/local/zookeeper-3.4.9/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
why am i getting this output?
and jps
command doesn't view
QuorumPeerMain
my .bashrc
file is
export JAVA_HOME=/usr/local/java-1.7.0/
export PATH=$PATH:$JAVA_HOME/bin
export HADOOP_HOME=/usr/local/hadoop/
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=/usr/local/hadoop
/lib/native"
export HADOOP_PREFIX=/usr/local/hadoop/
export PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin
export HADOOP_INSTALL=$HADOOP_HOME
https://stackoverflow.com/a/29950279/6419332
You can easily debug it by zkServer.sh start-foreground
zkServer.sh start-foreground makes it run out of demon mode!!!
The Zookeeper servers are not able to find their myid
file under the dataDir
.
Here the dataDir
is set as /usr/local/zookeeper/
, Create the myid
files directly under the defined dataDir
.
Restart Zookeeper servers after making the changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With