HBase集群安装过程中的问题集锦 – 李克华 – 博客园

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命令报错:

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-<span style="color: #000000;">throwing exception</p><p>org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode </span>= ConnectionLoss <span style="color: #0000ff;">for</span> /<span style="color: #000000;">hbase</p><p>        at org.apache.zookeeper.KeeperException.create(KeeperException.java:</span>99<span style="color: #000000;">)</p><p>        at org.apache.zookeeper.KeeperException.create(KeeperException.java:</span>51<span style="color: #000000;">)</p><p>        at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:</span>1041<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:</span>199<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:</span>479<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.checkIfBaseNodeAvailable(HConnectionManager.java:</span>822<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.access$</span>200(HConnectionManager.java:544<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(HConnectionManager.java:</span>1517<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStub(HConnectionManager.java:</span>1563<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(HConnectionManager.java:</span>1618<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getKeepAliveMasterService(HConnectionManager.java:</span>1826<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.listTableNames(HConnectionManager.java:</span>2542<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getTableNames(HConnectionManager.java:</span>2532<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.client.HBaseAdmin.getTableNames(HBaseAdmin.java:</span>352<span style="color: #000000;">)</p><p>        at org.apache.hadoop.hbase.client.HBaseAdmin.getTableNames(HBaseAdmin.java:</span>368<span style="color: #000000;">)</p><p>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:</span>57<span style="color: #000000;">)</p><p>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:</span>43<span style="color: #000000;">)</p><p>        at java.lang.reflect.Method.invoke(Method.java:</span>606<span style="color: #000000;">)</p><p>        at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:</span>450<span style="color: #000000;">)</p><p>        at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:</span>311<span style="color: #000000;">)</p><p>        at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:</span>59<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>312<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>169<span style="color: #000000;">)</p><p>        at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:</span>57<span style="color: #000000;">)</p><p>        at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:</span>63<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>190<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>199<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>312<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>169<span style="color: #000000;">)</p><p>        at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:</span>57<span style="color: #000000;">)</p><p>        at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:</span>123<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.BlockNode.interpret(BlockNode.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>169<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>191<span style="color: #000000;">)</p><p>        at org.jruby.RubyClass.finvoke(RubyClass.java:</span>552<span style="color: #000000;">)</p><p>        at org.jruby.RubyBasicObject.send(RubyBasicObject.java:</span>2777<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel.send(RubyKernel.java:</span>2105<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel$s$send.call(RubyKernel$s$send.gen:</span>65535<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(JavaMethod.java:</span>266<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>312<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>169<span style="color: #000000;">)</p><p>        at org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:</span>39<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:</span>111<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:</span>374<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:</span>295<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:</span>229<span style="color: #000000;">)</p><p>        at org.jruby.runtime.Block.yieldSpecific(Block.java:</span>99<span style="color: #000000;">)</p><p>        at org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:</span>25<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.executeBody(RescueNode.java:</span>216<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:</span>120<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.interpret(RescueNode.java:</span>110<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>169<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>191<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>302<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:</span>144<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:</span>153<span style="color: #000000;">)</p><p>        at org.jruby.ast.FCallSpecialArgBlockNode.interpret(FCallSpecialArgBlockNode.java:</span>34<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.executeBody(RescueNode.java:</span>216<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:</span>120<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.interpret(RescueNode.java:</span>110<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>233<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>215<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>332<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>203<span style="color: #000000;">)</p><p>        at org.jruby.ast.CallSpecialArgNode.interpret(CallSpecialArgNode.java:</span>69<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>233<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>215<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>332<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>203<span style="color: #000000;">)</p><p>        at org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:</span>41<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>190<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>199<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>312<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>169<span style="color: #000000;">)</p><p>        at org.jruby.ast.CallSpecialArgNode.interpret(CallSpecialArgNode.java:</span>67<span style="color: #000000;">)</p><p>        at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:</span>123<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.BlockNode.interpret(BlockNode.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>147<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>183<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>292<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>135<span style="color: #000000;">)</p><p>        at org.jruby.ast.VCallNode.interpret(VCallNode.java:</span>86<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.RootNode.interpret(RootNode.java:</span>129<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_EVAL(ASTInterpreter.java:</span>95<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.evalWithBinding(ASTInterpreter.java:</span>166<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel.evalCommon(RubyKernel.java:</span>1155<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel.eval(RubyKernel.java:</span>1112<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel$s$</span>0$3$eval.call(RubyKernel$s$0$3$eval.gen:65535<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:</span>181<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>282<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.ast.FCallManyArgsNode.interpret(FCallManyArgsNode.java:</span>60<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>120<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>134<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>174<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>282<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.ast.CallManyArgsNode.interpret(CallManyArgsNode.java:</span>59<span style="color: #000000;">)</p><p>        at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:</span>36<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.BlockNode.interpret(BlockNode.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>233<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>215<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>332<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>203<span style="color: #000000;">)</p><p>        at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:</span>59<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.BlockNode.interpret(BlockNode.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.executeBody(RescueNode.java:</span>216<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:</span>120<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.interpret(RescueNode.java:</span>110<span style="color: #000000;">)</p><p>        at org.jruby.ast.BeginNode.interpret(BeginNode.java:</span>83<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.BlockNode.interpret(BlockNode.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:</span>111<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:</span>374<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:</span>295<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:</span>229<span style="color: #000000;">)</p><p>        at org.jruby.runtime.Block.yieldSpecific(Block.java:</span>99<span style="color: #000000;">)</p><p>        at org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:</span>25<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:</span>96<span style="color: #000000;">)</p><p>        at org.jruby.ast.BeginNode.interpret(BeginNode.java:</span>83<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.BlockNode.interpret(BlockNode.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>212<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>207<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>322<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:</span>178<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:</span>187<span style="color: #000000;">)</p><p>        at org.jruby.ast.FCallOneArgBlockNode.interpret(FCallOneArgBlockNode.java:</span>34<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:</span>111<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:</span>374<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:</span>260<span style="color: #000000;">)</p><p>        at org.jruby.runtime.Block.yieldSpecific(Block.java:</span>117<span style="color: #000000;">)</p><p>        at org.jruby.ast.YieldTwoNode.interpret(YieldTwoNode.java:</span>31<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.IfNode.interpret(IfNode.java:</span>117<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.BlockNode.interpret(BlockNode.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.executeBody(RescueNode.java:</span>216<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:</span>120<span style="color: #000000;">)</p><p>        at org.jruby.ast.RescueNode.interpret(RescueNode.java:</span>110<span style="color: #000000;">)</p><p>        at org.jruby.ast.BeginNode.interpret(BeginNode.java:</span>83<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:</span>111<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:</span>374<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:</span>295<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:</span>229<span style="color: #000000;">)</p><p>        at org.jruby.runtime.Block.yieldSpecific(Block.java:</span>99<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel.loop(RubyKernel.java:</span>1439<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel$s$</span>0$0$loop.call(RubyKernel$s$0$0$loop.gen:65535<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>302<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:</span>144<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:</span>153<span style="color: #000000;">)</p><p>        at org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:</span>32<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:</span>111<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:</span>374<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:</span>347<span style="color: #000000;">)</p><p>        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:</span>304<span style="color: #000000;">)</p><p>        at org.jruby.runtime.Block.yield(Block.java:</span>130<span style="color: #000000;">)</p><p>        at org.jruby.RubyContinuation.enter(RubyContinuation.java:</span>106<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel.rbCatch(RubyKernel.java:</span>1212<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel$s$</span>1$0$rbCatch.call(RubyKernel$s$1$0$rbCatch.gen:65535<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>322<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:</span>178<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:</span>187<span style="color: #000000;">)</p><p>        at org.jruby.ast.FCallOneArgBlockNode.interpret(FCallOneArgBlockNode.java:</span>34<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.BlockNode.interpret(BlockNode.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>169<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>191<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>302<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:</span>144<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:</span>153<span style="color: #000000;">)</p><p>        at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:</span>64<span style="color: #000000;">)</p><p>        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:</span>104<span style="color: #000000;">)</p><p>        at org.jruby.ast.BlockNode.interpret(BlockNode.java:</span>71<span style="color: #000000;">)</p><p>        at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:</span>74<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:</span>147<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:</span>183<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>292<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>135<span style="color: #000000;">)</p><p>        at root.hadoop.hbase.bin.hirb.block_2$RUBY$start(</span>/root/hadoop/hbase/bin/hirb.rb:185<span style="color: #000000;">)</p><p>        at root$hadoop$hbase$bin$hirb$block_2$RUBY$start.call(root$hadoop$hbase$bin$hirb$block_2$RUBY$start:</span>65535<span style="color: #000000;">)</p><p>        at org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:</span>112<span style="color: #000000;">)</p><p>        at org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:</span>95<span style="color: #000000;">)</p><p>        at org.jruby.runtime.Block.yield(Block.java:</span>130<span style="color: #000000;">)</p><p>        at org.jruby.RubyContinuation.enter(RubyContinuation.java:</span>106<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel.rbCatch(RubyKernel.java:</span>1212<span style="color: #000000;">)</p><p>        at org.jruby.RubyKernel$s$</span>1$0$rbCatch.call(RubyKernel$s$1$0$rbCatch.gen:65535<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>322<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:</span>178<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:</span>187<span style="color: #000000;">)</p><p>        at root.hadoop.hbase.bin.hirb.method__5$RUBY$start(</span>/root/hadoop/hbase/bin/hirb.rb:184<span style="color: #000000;">)</p><p>        at root$hadoop$hbase$bin$hirb$method__5$RUBY$start.call(root$hadoop$hbase$bin$hirb$method__5$RUBY$start:</span>65535<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:</span>203<span style="color: #000000;">)</p><p>        at org.jruby.internal.runtime.methods.CompiledMethod.call(CompiledMethod.java:</span>255<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:</span>292<span style="color: #000000;">)</p><p>        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:</span>135<span style="color: #000000;">)</p><p>        at root.hadoop.hbase.bin.hirb.__file__(</span>/root/hadoop/hbase/bin/hirb.rb:190<span style="color: #000000;">)</p><p>        at root.hadoop.hbase.bin.hirb.load(</span>/root/hadoop/hbase/bin/<span style="color: #000000;">hirb.rb)</p><p>        at org.jruby.Ruby.runScript(Ruby.java:</span>697<span style="color: #000000;">)</p><p>        at org.jruby.Ruby.runScript(Ruby.java:</span>690<span style="color: #000000;">)</p><p>        at org.jruby.Ruby.runNormally(Ruby.java:</span>597<span style="color: #000000;">)</p><p>        at org.jruby.Ruby.runFromMain(Ruby.java:</span>446<span style="color: #000000;">)</p><p>        at org.jruby.Main.doRunFromMain(Main.java:</span>369<span style="color: #000000;">)</p><p>        at org.jruby.Main.internalRun(Main.java:</span>258<span style="color: #000000;">)</p><p>        at org.jruby.Main.run(Main.java:</span>224<span style="color: #000000;">)</p><p>        at org.jruby.Main.run(Main.java:</span>208<span style="color: #000000;">)</p><p>        at org.jruby.Main.main(Main.java:</span>188<span style="color: #000000;">)</p><p></span>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。<br>经判断是hbase版本的jar包和hadoop中的jar包不兼容的问题。解决方法:将hadoop中hadoop-2.2.0相关的jar包copy过来(${HABASE_HOME}/lib)替换即可。

来源URL:http://www.cnblogs.com/likehua/p/3850253.html