Zookeeper: It is probably not running
Asked Answered
L

4

8

I am trying to start zookeeper on a remote virtual machine. I use this for my project regularly and I do not have any problems while starting the zookeeper. But lately when I am trying to start the server I am getting an error. When I give ./zkServer.sh start it shows zookeeper server started. When I check for status using ./zkServer.sh status it shows "Error contacting service. It is probably not running." I am totally working with 5 Virtual Machines. All these machines were fine initially. I started getting problems with machine 1. But recently I have the same problem with all my virtual machines. Can someone tell me what the issue is and suggest me a way to clear this issue?

enter image description here

Langelo answered 28/4, 2015 at 2:21 Comment(3)
what has this got to do with java?Fr
@ScaryWombat Just hoping to find help with some java programmers who have experience with zookeeper. I am sorry if this is totally not relevant.Langelo
Have you tried running "ps -ef | grep zookeeper" on the machine, and see if there are any zk processes running? In a clustered setup, you should see QuorumPeerMain class started. Also, does "echo mntr | nc localhost 2181" show the server as active?Quadrifid
F
22

Most probably Zookeeper server exited. If we are running it on a Linux box, use the linux commands. Some of them:

ps -ef | grep -i zookeeper
jps

etc.

Also, try running it in foreground

zkServer.sh start-foreground
Fat answered 29/4, 2015 at 17:12 Comment(1)
Up voting for suggesting start process in foreground, it helps in debugging the issue.Accumbent
P
10

In My case the issue was $PATH issue... You will get what was the issue by running zookeeper in foreground

zkServer.sh start-foreground
Paugh answered 29/9, 2015 at 13:53 Comment(0)
N
0

I encountered same problem,too. In my case problem is about zookeeper locations configuration is not same for each node so zookeeper can not provide Quorum and mentioned nodes can not be part of cluster.

Please be sure server definition for each node is same.

For example for all nodes, server definition must be same as below

server.0=ip0:2888:3888
server.1=ip1:2888:3888
server.2=ip2:2888:3888
server.3=ip3:2888:3888
server.4=ip4:2888:3888
Neptunium answered 2/9, 2016 at 11:0 Comment(0)
G
0

In my case the issue was some how ClientPort attribute's value was missed in one of the box so in console it was showing as invalid config path.With the help of command 'zkServer.sh start-foreground' investigated and found root cause.

Guth answered 31/12, 2016 at 7:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.