I have Downloaded zookeeper-3.4.5.tar.gz and after extracting it I wrote conf/zoo.cfg as
tickTime=2000
dataDir=/var/zookeeper
clientPort=2181
Now I tried to start zookeeper by bin/zkServer.sh start it gives
mohit@mohit:~/zookeeper-3.4.5/bin$ sudo sh zkServer.sh start
[sudo] password for mohit:
JMX enabled by default
Using config: /home/mohit/zookeeper-3.4.5/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
But
$ echo ruok | nc localhost 2181
is not giving any output.
I checked zookeeper.out, it gives
mohit@mohit:~/zookeeper-3.4.5/bin$ cat zookeeper.out
nohup: failed to run command ‘java’: No such file or directory
mohit@mohit:~/zookeeper-3.4.5/bin$
But my JAVA variables are set, I am not getting why this error is coming?
mohit@mohit:~/zookeeper-3.4.5/bin$ echo $JAVA_HOME
/usr/lib/jdk
mohit@mohit:~/zookeeper-3.4.5/bin$ echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jdk/bin
please help.Thanks in advance:)
java -version
? - Elliott Frischsudo sh
is going to replace your environment. - Elliott Frisch