【Linux】【hbase】【Hadoop】基于Hadoop安装hbase单机版
前提;
已经安装JDK,本文安装JDK8,路径/home/jdk1.8.0_181,本文环境centos7
1、下载好所需安装包
hadoop-3.0.0.tar.gz(下载地址:https://archive.apache.org/dist/hadoop/core/hadoop-3.0.0/hadoop-3.0.0.tar.gz),hbase-2.1.0-bin.tar.gz(下载地址:http://archive.apache.org/dist/hbase/2.1.0/hbase-2.1.0-bin.tar.gz)
下载速度慢,可以用迅雷下载看看
本文分享迅雷云
hbase-2.1.0-bin.tar.gz的
链接:https://pan.xunlei.com/s/VMSfsbQyvOEvpWSacFLokehBA1
提取码:bf3i
hadoop-3.0.0.tar.gz的
链接:https://pan.xunlei.com/s/VMSfsk_hC_VS_hCKR8ls5TadA1
提取码:uy8d
2、本文把这2个安装包放在/home/hadoop,解压这2个安装包
cd /home/hadoop
tar -zxvf /home/hadoop/hadoop-3.0.0.tar.gz
tar -zxvf /home/hadoop/hbase-2.1.0-bin.tar.gz
3、hosts添加hbase.master
vi /etc/hosts
按i进入编辑
在后面加入192.168.8.71 hbase.master
注意ip为自己Linux的IP地址
按ESC,再按:wq保存退出
4、添加环境变量,添加下面内容,vi /etc/profile,然后重新加载文件source /etc/profile
export HBASE_HOME=/home/hadoop/hbase-2.1.0
export HDFS_NAMENODE_USER=root
export HDFS_DATANODE_USER=root
export HDFS_SECONDARYNAMENODE_USER=root
export YARN_RESOURCEMANAGER_USER=root
export YARN_NODEMANAGER_USER=root
5、hbase的hbase-env.sh文件添加下面内容(HBASE_MANAGES_ZK=true表示用自带的zookeeper),vi /home/hadoop/hbase-2.1.0/conf/hbase-env.sh
export JAVA_HOME=/home/jdk1.8.0_181
export HADOOP_HOME=/home/hadoop/hadoop-3.0.0
export HBASE_HOME=/home/hadoop/hbase-2.1.0
export HBASE_LOG_DIR=/home/hadoop/hbase-2.1.0/logs
export HBASE_CLASSPATH=/home/hadoop/hadoop-3.0.0/etc/hadoop
export HBASE_MANAGES_ZK=true
6、创建hbase的logs目录,mkdir /home/hadoop/hbase-2.1.0/logs
7、hbase的hbase-site.xml文件添加下面内容,注意自己IP,vi /home/hadoop/hbase-2.1.0/conf/hbase-site.xml
<property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.tmp.dir</name> <value>./tmp</value> </property> <property> <name>hbase.unsafe.stream.capability.enforce</name> <value>false</value> </property> <property> <name>hbase.master</name> <value>192.168.8.71:60000</value> </property> <property> <name>hbase.master.maxclockskew</name> <value>180000</value> </property> <property> <name>hbase.rootdir</name> <value>hdfs://192.168.8.71:9000/hbase</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>192.168.8.71</value> </property> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>hbase.zookeeper.property.clientPort</name> <value>2181</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/home/hadoop/hbase-2.1.0/zk_data</value> </property>
8、创建上面需要的文件夹mkdir /home/hadoop/hbase-2.1.0/zk_data
9、修改hbase的regionservers文件为自己IP,vi /home/hadoop/hbase-2.1.0/conf/regionservers
10、Hadoop的core-site.xml文件添加下面内容,vi /home/hadoop/hadoop-3.0.0/etc/hadoop/core-site.xml
<property> <name>fs.defaultFS</name> <value>hdfs://192.168.8.71:9000</value> </property>
11、Hadoop的hdfs-site.xml文件添加下面内容,vi /home/hadoop/hadoop-3.0.0/etc/hadoop/hdfs-site.xml
<property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>file:/home/hadoop/hadoop-3.0.0/dfs/name</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>file:/home/hadoop/hadoop-3.0.0/dfs/data</value> </property> <property> <name>dfs.permissions</name> <value>false</value> </property>
12、创建上面的2个目录
mkdir /home/hadoop/hadoop-3.0.0/dfs
mkdir /home/hadoop/hadoop-3.0.0/dfs/name
mkdir /home/hadoop/hadoop-3.0.0/dfs/data
13、Hadoop的mapred-site.xml文件添加下面内容,注意自己IP,vi /home/hadoop/hadoop-3.0.0/etc/hadoop/mapred-site.xml
<property> <name>mapred.job.tracker</name> <value>192.168.8.71:9001</value> </property>
14、Hadoop的hadoop-env.sh添加下面内容,vi /home/hadoop/hadoop-3.0.0/etc/hadoop/hadoop-env.sh
export JAVA_HOME=/home/jdk1.8.0_181
15、初始化HDFS系统,/home/hadoop/hadoop-3.0.0/bin/hdfs namenode -format
16、启动Hadoop,/home/hadoop/hadoop-3.0.0/sbin/start-all.sh
17、启动hbase,/home/hadoop/hbase-2.1.0/bin/start-hbase.sh
18、启动hbase shell,建表插入数据测试,/home/hadoop/hbase-2.1.0/bin/hbase shell
安装过程出现2个意外
1、启动Hadoop报错
上面第4步,添加的就是解决这个问题
export HDFS_NAMENODE_USER=root
export HDFS_DATANODE_USER=root
export HDFS_SECONDARYNAMENODE_USER=root
export YARN_RESOURCEMANAGER_USER=root
export YARN_NODEMANAGER_USER=root
2、启动hbase后,HMaster启动不了,报错如下,最终标红的才是问题,不是一开始抛出的错误,让人疑惑
2021-02-04 22:35:30,229 INFO [hconnection-0x58553c76-shared-pool4-t1] client.RpcRetryingCallerImpl: ache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) , details=row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hbase.master,16020,1612347858213, seqNum=-1 2021-02-04 22:35:34,272 INFO [hconnection-0x58553c76-shared-pool4-t1] client.RpcRetryingCallerImpl: ache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) , details=row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hbase.master,16020,1612347858213, seqNum=-1 2021-02-04 22:35:44,314 INFO [hconnection-0x58553c76-shared-pool4-t1] client.RpcRetryingCallerImpl: ache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) , details=row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hbase.master,16020,1612347858213, seqNum=-1 2021-02-04 22:35:54,382 INFO [hconnection-0x58553c76-shared-pool4-t1] client.RpcRetryingCallerImpl: ache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) , details=row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hbase.master,16020,1612347858213, seqNum=-1 2021-02-04 22:36:04,417 INFO [hconnection-0x58553c76-shared-pool4-t1] client.RpcRetryingCallerImpl: ache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) , details=row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hbase.master,16020,1612347858213, seqNum=-1 2021-02-04 22:36:14,421 INFO [hconnection-0x58553c76-shared-pool4-t1] client.RpcRetryingCallerImpl: ache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) , details=row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hbase.master,16020,1612347858213, seqNum=-1 2021-02-04 22:36:14,433 ERROR [Thread-14] master.HMaster: Failed to become active master org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=46, exceptions: Thu Feb 04 22:36:14 CST 2021, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=68879: org.apache.hadoop.hbase.NotServingRegionException: hbase:meta,,1 is not online on hbase.master,16020,1612449323294 at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hbase.master,16020,1612347858213, seqNum=-1 at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.throwEnrichedException(RpcRetryingCallerWithReadReplicas.java:299) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:242) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:58) at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithoutRetries(RpcRetryingCallerImpl.java:191) at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:269) at org.apache.hadoop.hbase.client.ClientScanner.loadCache(ClientScanner.java:437) at org.apache.hadoop.hbase.client.ClientScanner.nextWithSyncCache(ClientScanner.java:312) at org.apache.hadoop.hbase.client.ClientScanner.next(ClientScanner.java:597) at org.apache.hadoop.hbase.MetaTableAccessor.scanMeta(MetaTableAccessor.java:766) at org.apache.hadoop.hbase.MetaTableAccessor.scanMeta(MetaTableAccessor.java:734) at org.apache.hadoop.hbase.MetaTableAccessor.scanMeta(MetaTableAccessor.java:690) at org.apache.hadoop.hbase.MetaTableAccessor.fullScanTables(MetaTableAccessor.java:240) at org.apache.hadoop.hbase.master.TableStateManager.fixTableStates(TableStateManager.java:228) at org.apache.hadoop.hbase.master.TableStateManager.start(TableStateManager.java:220) at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:939) at org.apache.hadoop.hbase.master.HMaster.startActiveMasterManager(HMaster.java:2109) at org.apache.hadoop.hbase.master.HMaster.lambda$run$0(HMaster.java:566) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.SocketTimeoutException: callTimeout=60000, callDuration=68879: org.apache.hadoop.hbase.NotServingRegionException: hbase:meta,,1 is not online on hbase.master,16020,1612449323294 at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hbase.master,16020,1612347858213, seqNum=-1 at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithRetries(RpcRetryingCallerImpl.java:158) at org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture.run(ResultBoundedCompletionService.java:80) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ... 1 more Caused by: org.apache.hadoop.hbase.NotServingRegionException: org.apache.hadoop.hbase.NotServingRegionException: hbase:meta,,1 is not online on hbase.master,16020,1612449323294 at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.hadoop.hbase.ipc.RemoteWithExtrasException.instantiateException(RemoteWithExtrasException.java:100) at org.apache.hadoop.hbase.ipc.RemoteWithExtrasException.unwrapRemoteException(RemoteWithExtrasException.java:90) at org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil.makeIOExceptionOfException(ProtobufUtil.java:362) at org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil.handleRemoteException(ProtobufUtil.java:350) at org.apache.hadoop.hbase.client.ScannerCallable.openScanner(ScannerCallable.java:344) at org.apache.hadoop.hbase.client.ScannerCallable.rpcCall(ScannerCallable.java:242) at org.apache.hadoop.hbase.client.ScannerCallable.rpcCall(ScannerCallable.java:58) at org.apache.hadoop.hbase.client.RegionServerCallable.call(RegionServerCallable.java:127) at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithoutRetries(RpcRetryingCallerImpl.java:191) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.call(ScannerCallableWithReplicas.java:387) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.call(ScannerCallableWithReplicas.java:361) at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithRetries(RpcRetryingCallerImpl.java:107) ... 4 more Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.NotServingRegionException): org.apache.hadoop.hbase.NotServingRegionException: hbase:meta,,1 is not online on hbase.master,16020,1612449323294 at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) at org.apache.hadoop.hbase.ipc.AbstractRpcClient.onCallFinished(AbstractRpcClient.java:387) at org.apache.hadoop.hbase.ipc.AbstractRpcClient.access$100(AbstractRpcClient.java:95) at org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:410) at org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:406) at org.apache.hadoop.hbase.ipc.Call.callComplete(Call.java:103) at org.apache.hadoop.hbase.ipc.Call.setException(Call.java:118) at org.apache.hadoop.hbase.ipc.NettyRpcDuplexHandler.readResponse(NettyRpcDuplexHandler.java:161) at org.apache.hadoop.hbase.ipc.NettyRpcDuplexHandler.channelRead(NettyRpcDuplexHandler.java:191) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at org.apache.hbase.thirdparty.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) at org.apache.hbase.thirdparty.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at org.apache.hbase.thirdparty.io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at org.apache.hbase.thirdparty.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at org.apache.hbase.thirdparty.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935) at org.apache.hbase.thirdparty.io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:801) at org.apache.hbase.thirdparty.io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:404) at org.apache.hbase.thirdparty.io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304) at org.apache.hbase.thirdparty.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at org.apache.hbase.thirdparty.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) ... 1 more 2021-02-04 22:36:14,435 ERROR [Thread-14] master.HMaster: Master server abort: loaded coprocessors are: [] 2021-02-04 22:36:14,435 ERROR [Thread-14] master.HMaster: ***** ABORTING master hbase.master,16000,1612449321804: Unhandled exception. Starting shutdown. ***** org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=46, exceptions: Thu Feb 04 22:36:14 CST 2021, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=68879: org.apache.hadoop.hbase.NotServingRegionException: hbase:meta,,1 is not online on hbase.master,16020,1612449323294 at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hbase.master,16020,1612347858213, seqNum=-1 at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.throwEnrichedException(RpcRetryingCallerWithReadReplicas.java:299) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:242) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:58) at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithoutRetries(RpcRetryingCallerImpl.java:191) at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:269) at org.apache.hadoop.hbase.client.ClientScanner.loadCache(ClientScanner.java:437) at org.apache.hadoop.hbase.client.ClientScanner.nextWithSyncCache(ClientScanner.java:312) at org.apache.hadoop.hbase.client.ClientScanner.next(ClientScanner.java:597) at org.apache.hadoop.hbase.MetaTableAccessor.scanMeta(MetaTableAccessor.java:766) at org.apache.hadoop.hbase.MetaTableAccessor.scanMeta(MetaTableAccessor.java:734) at org.apache.hadoop.hbase.MetaTableAccessor.scanMeta(MetaTableAccessor.java:690) at org.apache.hadoop.hbase.MetaTableAccessor.fullScanTables(MetaTableAccessor.java:240) at org.apache.hadoop.hbase.master.TableStateManager.fixTableStates(TableStateManager.java:228) at org.apache.hadoop.hbase.master.TableStateManager.start(TableStateManager.java:220) at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:939) at org.apache.hadoop.hbase.master.HMaster.startActiveMasterManager(HMaster.java:2109) at org.apache.hadoop.hbase.master.HMaster.lambda$run$0(HMaster.java:566) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.SocketTimeoutException: callTimeout=60000, callDuration=68879: org.apache.hadoop.hbase.NotServingRegionException: hbase:meta,,1 is not online on hbase.master,16020,1612449323294 at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hbase.master,16020,1612347858213, seqNum=-1 at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithRetries(RpcRetryingCallerImpl.java:158) at org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture.run(ResultBoundedCompletionService.java:80) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ... 1 more Caused by: org.apache.hadoop.hbase.NotServingRegionException: org.apache.hadoop.hbase.NotServingRegionException: hbase:meta,,1 is not online on hbase.master,16020,1612449323294 at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.hadoop.hbase.ipc.RemoteWithExtrasException.instantiateException(RemoteWithExtrasException.java:100) at org.apache.hadoop.hbase.ipc.RemoteWithExtrasException.unwrapRemoteException(RemoteWithExtrasException.java:90) at org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil.makeIOExceptionOfException(ProtobufUtil.java:362) at org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil.handleRemoteException(ProtobufUtil.java:350) at org.apache.hadoop.hbase.client.ScannerCallable.openScanner(ScannerCallable.java:344) at org.apache.hadoop.hbase.client.ScannerCallable.rpcCall(ScannerCallable.java:242) at org.apache.hadoop.hbase.client.ScannerCallable.rpcCall(ScannerCallable.java:58) at org.apache.hadoop.hbase.client.RegionServerCallable.call(RegionServerCallable.java:127) at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithoutRetries(RpcRetryingCallerImpl.java:191) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.call(ScannerCallableWithReplicas.java:387) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.call(ScannerCallableWithReplicas.java:361) at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithRetries(RpcRetryingCallerImpl.java:107) ... 4 more Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.NotServingRegionException): org.apache.hadoop.hbase.NotServingRegionException: hbase:meta,,1 is not online on hbase.master,16020,1612449323294 at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:3287) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3264) at org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1421) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2954) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3279) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42002) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) at org.apache.hadoop.hbase.ipc.AbstractRpcClient.onCallFinished(AbstractRpcClient.java:387) at org.apache.hadoop.hbase.ipc.AbstractRpcClient.access$100(AbstractRpcClient.java:95) at org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:410) at org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:406) at org.apache.hadoop.hbase.ipc.Call.callComplete(Call.java:103) at org.apache.hadoop.hbase.ipc.Call.setException(Call.java:118) at org.apache.hadoop.hbase.ipc.NettyRpcDuplexHandler.readResponse(NettyRpcDuplexHandler.java:161) at org.apache.hadoop.hbase.ipc.NettyRpcDuplexHandler.channelRead(NettyRpcDuplexHandler.java:191) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at org.apache.hbase.thirdparty.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) at org.apache.hbase.thirdparty.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at org.apache.hbase.thirdparty.io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at org.apache.hbase.thirdparty.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at org.apache.hbase.thirdparty.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935) at org.apache.hbase.thirdparty.io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:801) at org.apache.hbase.thirdparty.io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:404) at org.apache.hbase.thirdparty.io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304) at org.apache.hbase.thirdparty.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at org.apache.hbase.thirdparty.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) ... 1 more 2021-02-04 22:36:14,436 INFO [Thread-14] regionserver.HRegionServer: ***** STOPPING region server 'hbase.master,16000,1612449321804' ***** 2021-02-04 22:36:14,436 INFO [Thread-14] regionserver.HRegionServer: STOPPED: Stopped by Thread-14 2021-02-04 22:36:14,437 INFO [master/hbase:16000] regionserver.HRegionServer: Stopping infoServer 2021-02-04 22:36:14,448 INFO [master/hbase:16000] handler.ContextHandler: Stopped o.e.j.w.WebAppContext@f91da5e{/,null,UNAVAILABLE}{file:/home/hadoop/hbase-2.1.0/hbase-webapps/master} 2021-02-04 22:36:14,454 INFO [master/hbase:16000] server.AbstractConnector: Stopped ServerConnector@4f66ffc8{HTTP/1.1,[http/1.1]}{0.0.0.0:16010} 2021-02-04 22:36:14,455 INFO [master/hbase:16000] handler.ContextHandler: Stopped o.e.j.s.ServletContextHandler@7487b142{/static,file:///home/hadoop/hbase-2.1.0/hbase-webapps/static/,UNAVAILABLE} 2021-02-04 22:36:14,455 INFO [master/hbase:16000] handler.ContextHandler: Stopped o.e.j.s.ServletContextHandler@58860997{/logs,file:///home/hadoop/hbase-2.1.0/logs/,UNAVAILABLE} 2021-02-04 22:36:14,456 INFO [master/hbase:16000] regionserver.HRegionServer: stopping server hbase.master,16000,1612449321804 2021-02-04 22:36:14,457 INFO [master/hbase:16000] zookeeper.ReadOnlyZKClient: Close zookeeper connection 0x21f43928 to 192.168.8.71:2181 2021-02-04 22:36:14,458 INFO [master/hbase:16000] regionserver.HRegionServer: stopping server hbase.master,16000,1612449321804; all regions closed. 2021-02-04 22:36:14,458 INFO [master/hbase:16000] hbase.ChoreService: Chore service for: master/hbase:16000 had [] on shutdown 2021-02-04 22:36:14,461 INFO [ReadOnlyZKClient-192.168.8.71:2181@0x21f43928] zookeeper.ZooKeeper: Session: 0x1776d780f0f0001 closed 2021-02-04 22:36:14,461 INFO [ReadOnlyZKClient-192.168.8.71:2181@0x21f43928-EventThread] zookeeper.ClientCnxn: EventThread shut down for session: 0x1776d780f0f0001 2021-02-04 22:36:14,461 WARN [master/hbase:16000] master.ActiveMasterManager: Failed get of master address: java.io.IOException: Can't get master address from ZooKeeper; znode data == null 2021-02-04 22:36:14,462 INFO [master/hbase:16000] assignment.AssignmentManager: Stopping assignment manager 2021-02-04 22:36:14,464 INFO [master/hbase:16000] procedure2.RemoteProcedureDispatcher: Stopping procedure remote dispatcher 2021-02-04 22:36:14,464 INFO [master/hbase:16000] procedure2.ProcedureExecutor: Stopping 2021-02-04 22:36:14,468 INFO [master/hbase:16000] wal.WALProcedureStore: Stopping the WAL Procedure Store, isAbort=false 2021-02-04 22:36:14,489 INFO [master/hbase:16000] hbase.ChoreService: Chore service for: master/hbase:16000.splitLogManager. had [[ScheduledChore: Name: SplitLogManager Timeout Monitor Period: 1000 Unit: MILLISECONDS]] on shutdown 2021-02-04 22:36:14,489 INFO [master/hbase:16000] flush.MasterFlushTableProcedureManager: stop: server shutting down. 2021-02-04 22:36:14,489 INFO [master/hbase:16000] ipc.NettyRpcServer: Stopping server on /192.168.8.71:16000 2021-02-04 22:36:14,499 INFO [master/hbase:16000] zookeeper.ZooKeeper: Session: 0x1776d780f0f0000 closed 2021-02-04 22:36:14,499 INFO [main-EventThread] zookeeper.ClientCnxn: EventThread shut down for session: 0x1776d780f0f0000 2021-02-04 22:36:14,499 INFO [master/hbase:16000] regionserver.HRegionServer: Exiting; stopping=hbase.master,16000,1612449321804; zookeeper connection closed.
上面第7步添加和第8步创建文件夹,才是解决问题
<property> <name>hbase.zookeeper.property.dataDir</name> <value>/home/hadoop/hbase-2.1.0/zk_data</value> </property>
参考文章:https://blog.csdn.net/pucao_cug/article/details/72229223