设为首页收藏本站

小牛社区-大数据学习交流社区|大数据免费学习资源

 找回密码
 立即注册!

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 438|回复: 0

HBase-0.90.4集群安装配置-总结说明

[复制链接]

3203

主题

3533

帖子

1万

积分

管理员

Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18

积分
14297
发表于 2016-6-4 23:33:10 | 显示全部楼层 |阅读模式
1、出现版本不一致错误
如果启动时出现版本不一致的错误,如下所示:
2012-01-06 21:27:18,384 FATAL org.apache.Hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown.
org.apache.Hadoop.ipc.RemoteException: Server IPC version 5 cannot communicate with client version 3
at org.apache.Hadoop.ipc.Client.call(Client.java:740)
at org.apache.Hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)
at $Proxy5.getProtocolVersion(Unknown Source)
at org.apache.Hadoop.ipc.RPC.getProxy(RPC.java:359)
at org.apache.Hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:113)
at org.apache.Hadoop.hdfs.DFSClient.(DFSClient.java:215)
at org.apache.Hadoop.hdfs.DFSClient.(DFSClient.java:177)
at org.apache.Hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:82)
at org.apache.Hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1378)
at org.apache.Hadoop.fs.FileSystem.access$200(FileSystem.java:66)
at org.apache.Hadoop.fs.FileSystem$Cache.get(FileSystem.java:1390)
at org.apache.Hadoop.fs.FileSystem.get(FileSystem.java:196)
at org.apache.Hadoop.fs.Path.getFileSystem(Path.java:175)
at org.apache.Hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:364)
at org.apache.Hadoop.hbase.master.MasterFileSystem.(MasterFileSystem.java:81)
at org.apache.Hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:346)
at org.apache.Hadoop.hbase.master.HMaster.run(HMaster.java:282)
2012-01-02 21:27:18,384 INFO org.apache.Hadoop.hbase.master.HMaster: Aborting
这就是说明Hadoop和HBase版本不匹配,仔细阅读文档,你会在http://hbase.apache.org/book.html#hadoop发现,解释如下所示:
Because HBase depends on Hadoop, it bundles an instance of the Hadoop jar under its lib directory. The bundled jar is ONLY
for use in standalone mode. In
distributed mode, it is critical that the version of Hadoop that is out on your cluster match what is under HBase. Replace the hadoop jar found in the HBase lib
directory with the Hadoop jar you are running on your cluster to avoid version mismatch issues. Make sure you replace the jar in HBase everywhere on your cluster.
Hadoop version mismatch issues have various manifestations but often all looks like its hung up.
将HBase解压缩包中lib的Hadoop Core jar文件替换为当前你所使用的Hadoop版本即可。
2、HBase集群启动以后,执行相关操作时抛出异常
如果HBase集群正常启动,但是在想要创建一个table的时候,出现如下异常,如下所示:
ERROR: org.apache.Hadoop.hbase.NotAllMetaRegionsOnlineException: org.apache.hadoop.hbase.NotAllMetaRegionsOnlineException: Timed out (10000ms)
at org.apache.Hadoop.hbase.catalog.CatalogTracker.waitForMeta(CatalogTracker.java:334)
at org.apache.Hadoop.hbase.master.HMaster.createTable(HMaster.java:769)
at org.apache.Hadoop.hbase.master.HMaster.createTable(HMaster.java:743)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.Hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
at org.apache.Hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
解决方法就是,修改/etc/hosts文件,修改内容以master为例,如下所示:
#127.0.0.1 localhost
192.168.0.180 master
192.168.0.191 slave-01
192.168.0.190 slave-02
192.168.0.189 slave-03
# The following lines are desirable for IPv6 capable hosts
#::1 ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters
然后,再进行相关操作就没有问题了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册!

本版积分规则

快速回复 返回顶部 返回列表