在使用HBase Shell的时候出现错误:
ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 times
查看一下logs:
FATAL org.apache.hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown. org.apache.hadoop.ipc.RPC$VersionMismatch: Protocol org.apache.hadoop.hdfs.protocol.ClientProtocol version mismatch. (client = 42, server = 41) at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:364) at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:113) at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:215) at org.apache.hadoop.hdfs.DFSClient.<init>(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:363) at org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java:81) at org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:342) at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:279) 2012-02-01 14:41:52,870 INFO org.apache.hadoop.hbase.master.HMaster: Aborting 2012-02-01 14:41:52,870 DEBUG org.apache.hadoop.hbase.master.HMaster: Stopping service threads
解决:
将hbase/lib目录下的hadoop-core的jar文件删除,将hadoop目录下的hadoop-0.20.2-core.jar拷贝到hbase/lib下面,然后重新启动hbase,问题解决。