查看regionserver节点的log:
018-11-03 09:54:18,787 ERROR [regionserver/dn1/192.168.0.45:16020] regionserver.HRegionServer: Failed init
java.lang.IllegalArgumentException: java.net.UnknownHostException: cluster1
at org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:378)
at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:320)
at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:176)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:678)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:619)
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:149)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2669)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:94)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2703)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2685)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:373)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295)
at org.apache.hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:1037)
at org.apache.hadoop.hbase.util.FSUtils.isValidWALRootDir(FSUtils.java:1080)
at org.apache.hadoop.hbase.util.FSUtils.getWALRootDir(FSUtils.java:1062)
at org.apache.hadoop.hbase.regionserver.HRegionServer.initializeFileSystem(HRegionServer.java:660)
at org.apache.hadoop.hbase.regionserver.HRegionServer.handleReportForDutyResponse(HRegionServer.java:1437)
at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:974)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.UnknownHostException: cluster1
... 19 more
注意到是由于hdfs的路径引起的。虽然我在配置集群的时候取名叫做cluster1了,但是Hbase还是无法找到。
解决方案:
修改hbase-site中:
<property>
<name>hbase.rootdir</name>
<value>hdfs://cluster1/hbase</value>
<property>
为:
<property>
<name>hbase.rootdir</name>
<value>hdfs://nna:9000/hbase</value>
<property>
网友评论