在cygwin中使用hbase时,Zookeeper异常

时间:2013-10-04 09:16:52

标签: hbase apache-zookeeper

我一直试图在Windows上运行cybase上的hbase,而且我在使这个工作正常时遇到了一些麻烦。 问题是我遇到这个错误时遇到了一些麻烦,因为我无法找到有关此异常的任何有用帮助。

user@myself ~/apache/hbase
$ ./bin/start-hbase.sh
localhost: starting zookeeper, logging to /home/user/apache/hbase/bin/../logs/hbase-myself-zookeeper-myself.out
starting master, logging to /home/user/apache/hbase/bin/../logs/hbase-myself-master-myself.out
java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
        at java.lang.Class.getMethod0(Class.java:2764)
        at java.lang.Class.getMethod(Class.java:1653)
        at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
localhost: starting regionserver, logging to /home/user/apache/hbase/bin/../logs/hbase-myself-regionserver-myself.out
localhost: java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException
localhost:      at java.lang.Class.getDeclaredMethods0(Native Method)
localhost:      at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
localhost:      at java.lang.Class.getMethod0(Class.java:2764)
localhost:      at java.lang.Class.getMethod(Class.java:1653)
localhost:      at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
localhost:      at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
localhost: Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException
localhost:      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
localhost:      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

为了实现这一目标,我一直在使用这些网站:
http://hbase.apache.org/book/quickstart.html
http://hbase.apache.org/cygwin.html
http://archive.cloudera.com/cdh/3/hbase/cygwin.html
http://alans.se/blog/2010/hadoop-hbase-cygwin-windows-7-x64/

这些都没有针对这个问题的解决方案,所以我不知道我做错了什么。

我可以确认zookeeper zookeeper-3.4.5.jar位于/ home / user / apache / hbase / lib中 我正在使用hbase版本0.94.12。 我正在使用cygwin版本1.7.25 x64版本。

1 个答案:

答案 0 :(得分:0)

HBASE版本= 0.94.12 CYGwin环境

转到/hbase/conf/Hbase-env.sh

HBASE_CLASSPATH = /cygdrive/c/cygwin/usr/local/hbase-0.94.12/lib/zookeeper-3.4.5.jar

将解决zookeeper异常......