HBase集群安装过程中的问题集锦

时间:2022-03-01 23:10:55

1、HRegionServer启动不正常

在namenode上执行jps,则可看到hbase启动是否正常,进程如下:

[root@master bin]# jps
26341 HMaster
26642 Jps
7840 ResourceManager
7524 NameNode
7699 SecondaryNameNode

由上可见,hadoop启动正常。HBase少了一个进程,猜测应该是有个节点regionserver没有启动成功。

进入节点slave1 ,执行jps查看启动进程:

[root@master bin]# ssh slave1
Last login: Thu Jul 17 17:29:11 2014 from master
[root@slave1 ~]# jps
4296 DataNode
11261 HRegionServer
11512 Jps
11184 QuorumPeerMain

由此可见Slave1节点正常。

进入节点slave2节点,执行jps查看启动进程:

[root@slave2 ~]# jps
3795 DataNode
11339 Jps
11080 QuorumPeerMain

OK,问题找到了 HRegionServer没有启动成功。进入HBase日志:

2014-07-17 09:28:19,392 INFO  [regionserver60020] regionserver.HRegionServer: STOPPED: Unhandled: org.apache.hadoop.hbase.ClockOutOfSyncException: Server slave2,60020,1405560498057 has been rejected; Reported time is too far out of sync with master.  Time difference of 28804194ms > max allowed of 30000ms
        at org.apache.hadoop.hbase.master.ServerManager.checkClockSkew(ServerManager.java:314)
        at org.apache.hadoop.hbase.master.ServerManager.regionServerStartup(ServerManager.java:215)
        at org.apache.hadoop.hbase.master.HMaster.regionServerStartup(HMaster.java:1292)
        at org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos$RegionServerStatusService$2.callBlockingMethod(RegionServerStatusProtos.java:5085)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2185)
        at org.apache.hadoop.hbase.ipc.RpcServer$Handler.run(RpcServer.java:1889)

根据错误日志,可得到slave2和maste机器时间差太多,查看各个系统的时间,果真如此,同步即可。另外一种方法就是配置hbase的配置文件:

配置:hbase.master.maxclockske

<property>
                <name>hbase.master.maxclockskew</name>
                <value>200000</value>
                <description>Time difference of regionserver from master</description>
        </property>

这种方法不推荐

2、Zookeeper启动不正常。

  在启动hbase时,总是报错,提示zookeeper连接不上,查看zookeeper日志,发现:

  ClientCnxn$SendThread@966] - Opening socket connection to server slave1. Will not attempt to authenticate using SASL (无法定位登录配置)。经过百度可得

由于hosts文件的问题,于是vi /etc/hosts 发现 ip slave1配置中ip错误。汗!幸亏hbase和zookeeper都有日志。于是重启zookeeper和hbase,上述问题解决。

3、HBase shell执行list命令报错

  在Hbase shell执行list命令报错:

HBase集群安装过程中的问题集锦HBase集群安装过程中的问题集锦
2014-07-17 14:01:32,384 ERROR [main] zookeeper.ZooKeeperWatcher: hconnection-0x4b936059, quorum=slave2:2181,slave1:2181,master:2181, baseZNode=/hbase Received unexpected KeeperException, re-throwing exception
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode
= ConnectionLoss for /hbase
at org.apache.zookeeper.KeeperException.create(KeeperException.java:
99)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:
51)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:
1041)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:
199)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:
479)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.checkIfBaseNodeAvailable(HConnectionManager.java:
822)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.access$
200(HConnectionManager.java:544)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(HConnectionManager.java:
1517)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStub(HConnectionManager.java:
1563)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(HConnectionManager.java:
1618)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getKeepAliveMasterService(HConnectionManager.java:
1826)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.listTableNames(HConnectionManager.java:
2542)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getTableNames(HConnectionManager.java:
2532)
at org.apache.hadoop.hbase.client.HBaseAdmin.getTableNames(HBaseAdmin.java:
352)
at org.apache.hadoop.hbase.client.HBaseAdmin.getTableNames(HBaseAdmin.java:
368)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:
606)
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:
450)
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:
311)
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:
59)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
312)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
169)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:
57)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:
63)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
190)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
199)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
312)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
169)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:
57)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:
123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:
71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
169)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
191)
at org.jruby.RubyClass.finvoke(RubyClass.java:
552)
at org.jruby.RubyBasicObject.send(RubyBasicObject.java:
2777)
at org.jruby.RubyKernel.send(RubyKernel.java:
2105)
at org.jruby.RubyKernel$s$send.call(RubyKernel$s$send.gen:
65535)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(JavaMethod.java:
266)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
312)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
169)
at org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:
39)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:
111)
at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:
374)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:
295)
at org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:
229)
at org.jruby.runtime.Block.yieldSpecific(Block.java:
99)
at org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:
25)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:
216)
at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:
120)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:
110)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
169)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
191)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
302)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:
144)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:
153)
at org.jruby.ast.FCallSpecialArgBlockNode.interpret(FCallSpecialArgBlockNode.java:
34)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:
216)
at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:
120)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:
110)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
233)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
215)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
332)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
203)
at org.jruby.ast.CallSpecialArgNode.interpret(CallSpecialArgNode.java:
69)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
233)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
215)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
332)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
203)
at org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:
41)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
190)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
199)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
312)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
169)
at org.jruby.ast.CallSpecialArgNode.interpret(CallSpecialArgNode.java:
67)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:
123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:
71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
147)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
183)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
292)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
135)
at org.jruby.ast.VCallNode.interpret(VCallNode.java:
86)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.RootNode.interpret(RootNode.java:
129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_EVAL(ASTInterpreter.java:
95)
at org.jruby.evaluator.ASTInterpreter.evalWithBinding(ASTInterpreter.java:
166)
at org.jruby.RubyKernel.evalCommon(RubyKernel.java:
1155)
at org.jruby.RubyKernel.eval(RubyKernel.java:
1112)
at org.jruby.RubyKernel$s$
0$3$eval.call(RubyKernel$s$0$3$eval.gen:65535)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:
181)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
282)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
71)
at org.jruby.ast.FCallManyArgsNode.interpret(FCallManyArgsNode.java:
60)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
120)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
134)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
174)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
282)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
71)
at org.jruby.ast.CallManyArgsNode.interpret(CallManyArgsNode.java:
59)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:
36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:
71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
233)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
215)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
332)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
203)
at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:
59)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:
71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:
216)
at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:
120)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:
110)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:
83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:
71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:
111)
at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:
374)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:
295)
at org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:
229)
at org.jruby.runtime.Block.yieldSpecific(Block.java:
99)
at org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:
25)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:
96)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:
83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:
71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
212)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
207)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
322)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:
178)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:
187)
at org.jruby.ast.FCallOneArgBlockNode.interpret(FCallOneArgBlockNode.java:
34)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:
111)
at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:
374)
at org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:
260)
at org.jruby.runtime.Block.yieldSpecific(Block.java:
117)
at org.jruby.ast.YieldTwoNode.interpret(YieldTwoNode.java:
31)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.IfNode.interpret(IfNode.java:
117)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:
71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:
216)
at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:
120)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:
110)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:
83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:
111)
at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:
374)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:
295)
at org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:
229)
at org.jruby.runtime.Block.yieldSpecific(Block.java:
99)
at org.jruby.RubyKernel.loop(RubyKernel.java:
1439)
at org.jruby.RubyKernel$s$
0$0$loop.call(RubyKernel$s$0$0$loop.gen:65535)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
302)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:
144)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:
153)
at org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:
32)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:
111)
at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:
374)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:
347)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:
304)
at org.jruby.runtime.Block.yield(Block.java:
130)
at org.jruby.RubyContinuation.enter(RubyContinuation.java:
106)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:
1212)
at org.jruby.RubyKernel$s$
1$0$rbCatch.call(RubyKernel$s$1$0$rbCatch.gen:65535)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
322)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:
178)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:
187)
at org.jruby.ast.FCallOneArgBlockNode.interpret(FCallOneArgBlockNode.java:
34)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:
71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
169)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
191)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
302)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:
144)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:
153)
at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:
64)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:
104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:
71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:
74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:
147)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:
183)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
292)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
135)
at root.hadoop.hbase.bin.hirb.block_2$RUBY$start(
/root/hadoop/hbase/bin/hirb.rb:185)
at root$hadoop$hbase$bin$hirb$block_2$RUBY$start.call(root$hadoop$hbase$bin$hirb$block_2$RUBY$start:
65535)
at org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:
112)
at org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:
95)
at org.jruby.runtime.Block.yield(Block.java:
130)
at org.jruby.RubyContinuation.enter(RubyContinuation.java:
106)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:
1212)
at org.jruby.RubyKernel$s$
1$0$rbCatch.call(RubyKernel$s$1$0$rbCatch.gen:65535)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
322)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:
178)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:
187)
at root.hadoop.hbase.bin.hirb.method__5$RUBY$start(
/root/hadoop/hbase/bin/hirb.rb:184)
at root$hadoop$hbase$bin$hirb$method__5$RUBY$start.call(root$hadoop$hbase$bin$hirb$method__5$RUBY$start:
65535)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:
203)
at org.jruby.internal.runtime.methods.CompiledMethod.call(CompiledMethod.java:
255)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:
292)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
135)
at root.hadoop.hbase.bin.hirb.__file__(
/root/hadoop/hbase/bin/hirb.rb:190)
at root.hadoop.hbase.bin.hirb.load(
/root/hadoop/hbase/bin/hirb.rb)
at org.jruby.Ruby.runScript(Ruby.java:
697)
at org.jruby.Ruby.runScript(Ruby.java:
690)
at org.jruby.Ruby.runNormally(Ruby.java:
597)
at org.jruby.Ruby.runFromMain(Ruby.java:
446)
at org.jruby.Main.doRunFromMain(Main.java:
369)
at org.jruby.Main.internalRun(Main.java:
258)
at org.jruby.Main.run(Main.java:
224)
at org.jruby.Main.run(Main.java:
208)
at org.jruby.Main.main(Main.java:
188)
2014-07-17 14:01:32,387 ERROR [main] client.HConnectionManager$HConnectionImplementation: Can't get connection to ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase
View Code

关键错误信息:client.HConnectionManager$HConnectionImplementation: Can't get connection to ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase。根据信息可以判断zk无法连接。执行jps查看zk都正常。查看hbase-site.xml中zk节点配置正常。根据经验,应该是防火墙没有关闭,2181端口无法访问。ok执行service iptables stop关闭防火墙,重启hbase。进入hbase shell,执行list:

hbase(main):001:0> list
TABLE
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/hadoop/hbase/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/hadoop/hadoop-2.2.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2014-07-17 14:06:26,013 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
0 row(s) in 1.0070 seconds

=> []

一切正常,问题解决。

4、HBase Shell 增删改异常。

  在hbase shell上做增删改就会报异常,

zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect。
经判断是hbase版本的jar包和hadoop中的jar包不兼容的问题。解决方法:将hadoop中hadoop-2.2.0相关的jar包copy过来(${HABASE_HOME}/lib)替换即可。