./zkServer.sh status Error contacting service. It is probably not running
Asked Answered
A

3

7

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
Azaleah answered 30/3, 2017 at 10:12 Comment(5)
The myid file must be created under /usr/local/zookeeper/.Proven
myid file in three nodes is located under /usr/local/zookeeper/data/myidAzaleah
and /usr/local is the same path where hadoop locatesAzaleah
that's true my datadir in zoocfg had to bee /usr/local/zookeeper/data i updeted it and the status of hadoop-master was leader and for hadoop-slave-1 was follower and for hadoop-slave-2 was follower thanks very muchAzaleah
Does this answer your question? Zookeeper: It is probably not runningKetose
P
10

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.

Proven answered 30/3, 2017 at 10:44 Comment(0)
P
15

https://mcmap.net/q/1240774/-zookeeper-it-is-probably-not-running

You can easily debug it by zkServer.sh start-foreground

zkServer.sh start-foreground makes it run out of demon mode!!!

Pick answered 26/9, 2017 at 14:25 Comment(1)
Good one, pave the way to troubleshoot the issue on their wayLongsuffering
P
10

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.

Proven answered 30/3, 2017 at 10:44 Comment(0)
K
0

it's may be firewall or selinux they need to be turned off or allow for zookeeper

Kuban answered 29/6, 2023 at 16:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.