2
votes

I downloaded zookeeper-3.4.6.tar.gz and while executing zkServer.sh start , I am getting below error.I did google but couldn't find a solution, Please let me kno if you see similar issues.

  • CLASSPATH=/home/spanda20/zookeeper/bin/../src/java/lib/*.jar:/home/spanda20/zookeeper/bin/../conf: zkServer.sh: 81: /home/spanda20/zookeeper/bin/zkEnv.sh: Syntax error: "(" unexpected (expecting "fi")
3
I have exactly the same version and I would say your install is broken, on line 81, I have echo "Using config: $ZOOCFG" >&2. The md5 of the file is dec17b86d0a345889b68233752999645 what is yours?vanthome
I didn't get your point. ZOOCFG is your config file rt.. Whats does echo "Using config: $ZOOCFG" >&2 mean.. Sorry can you pls put in details.user3858193
I'm talking about zkServer.sh in the bin folder.vanthome
Here is the value and it matches..dec17b86d0a345889b68233752999645 zkServer.shuser3858193
For me it works with just ./zkServer.sh start. What is the default shell on the system you are using?vanthome

3 Answers

2
votes

Finally I am able to see storm UI and its running. Below changes I did in the .bashrc file. Please make sure that You add bin path in the PATH VARIABLE.

I did add the below variables in the .bashrc file.

export JAVA_HOME =JDK Path export ZOOKEPER_HOME =Zookeper install path Then add them in the variable path. PATH= $PATH:$JAVA_HOME/bin:$ZOOKEPER_HOME/bin

Thanks Sanjeeb

1
votes

I'm using zookeeper version 3.4.9 on ubuntu 14.04 and installed openjdk 7. I have added below lines to ~/.bashrc export JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64" export ZOOKEEPER_HOME ="/path/to/zookeeper" PATH=$PATH:$JAVA_HOME/bin:$ZOOKEEPER_HOME/bin.

First I ran sh /path-to-zookeeper/bin/zkServer.sh start but didn't not work I got the same error.

I ran it with sudo /bin/bash /path-to-zookeeper/bin/zkServer.sh start it worked.

0
votes
./zkServer.sh start

This should work.

Edit /etc/environment, and paste the following:

JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME/bin"

modify the JAVA_HOME as per your local Java version.