简体   繁体   English

在Windows上安装HBase:获取zookeeper KeeperException

[英]Install HBase on windows: Get zookeeper KeeperException

I try to install HBase on windows. 我尝试在Windows上安装HBase。 I follow all the steps of this website: http://ics.upjs.sk/~novotnyr/blog/334/setting-up-hbase-on-windows 我按照本网站的所有步骤操作: http//ics.upjs.sk/~novotnyr/blog/334/setting-up-hbase-on-windows

When I try to start HBase I got the following error and I can't find the solution: 当我尝试启动HBase时出现以下错误,我找不到解决方案:

java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.lang.Class.getMethod0(Unknown Source)
    at java.lang.Class.getMethod(Unknown Source)
    at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
    at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
localhost: ssh_exchange_identification: read: Connection reset by peer

Can you help me to understand? 你能帮我理解吗? Thanks 谢谢

It seems that with recent versions, there's an issue in the way the classpath list of jars is built, so you need to include a dummy file that comes after "zookeeper" alphabetically otherwise the last file in the directory gets skipped. 似乎在最近的版本中,jars的类路径列表的构建方式存在问题,因此您需要按字母顺序包含“zookeeper”之后的虚拟文件,否则将跳过目录中的最后一个文件。 Touch "zzz.jar" (creating a 0 byte file) in the hbase/lib directory, then try starting it again. 触摸hbase / lib目录中的“zzz.jar”(创建一个0字节文件),然后再次尝试启动它。

I originally also added the hbase/lib directory in the HBASE_CLASSPATH in the hbase_env.sh file, but I suspect the trick above would have sufficed. 我最初还在hbase_env.sh文件中的HBASE_CLASSPATH中添加了hbase / lib目录,但我怀疑上面的技巧已经足够了。

See shapkin's answer here: https://stackoverflow.com/a/19981264 请参阅shapkin的答案: https ://stackoverflow.com/a/19981264

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM