Start zookeeper by the command
$ZOOKEEPER_HOME/bin/zkServer.sh start

Stop it by the command
$ZOOKEEPER_HOME/bin/zkServer.sh stop

On 4/19/14, [email protected] <[email protected]> wrote:
> I'd suggest running zookeeper as a service.
>
> Sudo apt-get install zookeeper
> Sudo service zookeeper start
>
>
> Sent from my iPhone
>
>> On Apr 18, 2014, at 5:05 PM, Jason Beere <[email protected]> wrote:
>>
>> Hello,
>> I’m trying to set up Storm and Zookeeper on Ubuntu Linux v12.04.
>>
>> I’m setting up Zookeeper.  I run the command:
>> java -cp
>> zookeeper-3.4.6.jar:lib/slf4j-api-1.6.1.jar:lib/slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf
>> \ org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
>>
>> and get the error:
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/zookeeper/server/quorum/QuorumPeerMain
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.zookeeper.server.quorum.QuorumPeerMain
>>                 at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>>                 at java.security.AccessController.doPrivileged(Native
>> Method)
>>                 at
>> java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>>                 at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
>>                 at
>> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>>                 at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
>> Could not find the main class:
>> org.apache.zookeeper.server.quorum.QuorumPeerMain. Program will exit.
>>
>> The same error occurs when I run:
>> java -cp
>> zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf
>> \ org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
>> or
>> java -cp zookeeper:lib/log4j-1.2.15.jar:conf \
>> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
>>
>> I ran a md5 checksum on zookeeper-3.4.6.jar
>>
>> I’ve tried running with Sun JDK v7, Sun JDK v6 (6u45), and Open-JDK v6.
>> I’m running Ubuntu 12.04 in VMware
>> I’ve tried Zookeeper v3.3.6, 3.4.5, & v3.4.6
>>
>> I’ve set JAVA_HOME and zookeeper in my path.  I put the zookeeper
>> directory in my root directory and in my home directory.  There are no
>> spaces in my path for zookeeper.
>>
>> When I run java -jar zookeeper-3.4.6.jar
>> I get the error:
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/slf4j/LoggerFactory
>>                 at
>> org.apache.zookeeper.server.quorum.QuorumPeer.<clinit>(QuorumPeer.java:79)
>> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>>                 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>>                 at java.security.AccessController.doPrivileged(Native
>> Method)
>>                 at
>> java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>                 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>                 at
>> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>                 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>                 ... 1 more
>> Could not find the main class:
>> org.apache.zookeeper.server.quorum.QuorumPeer. Program will exit.
>>
>> So it appears java can see the
>> org.apache.zookeeper.server.quorum.QuorumPeerMain class.  I can open the
>> jar and view the QuorumPeerMain class.
>>
>> I’m running these commands from the zookeeper directory.  I downloaded the
>> binaries.
>>
>> I’d post this question in the zookeeper discussion group but there doesn’t
>> appear to be one.
>>
>>
>> Thanks,
>> Jason
>>
>

Reply via email to