问题描述:
进入hbase shell后,使用list查询时报错
ERROR: KeeperErrorCode = NoNode for /hbase/master
问题分析:
通过查询日志文件的报错信息,大概推测是hbase-site.xml文件中的rootdir路径不对
2024-03-14 11:00:41,333 ERROR [master/master:16000:becomeActiveMaster] master.HMaster: Failed to become active master
java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: hdfs://master:9820.tmp
at org.apache.hadoop.fs.Path.initialize(Path.java:254)
at org.apache.hadoop.fs.Path.<init>(Path.java:152)
at org.apache.hadoop.fs.Path.<init>(Path.java:120)
at org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java:110)
at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:904)
at org.apache.hadoop.hbase.master.HMaster.startActiveMasterManager(HMaster.java:2110)
at org.apache.hadoop.hbase.master.HMaster.lambda$run$0(HMaster.java:580)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.URISyntaxException: Relative path in absolute URI: hdfs://master:9820.tmp
at java.net.URI.checkPath(URI.java:1823)
at java.net.URI.<init>(URI.java:745)
at org.apache.hadoop.fs.Path.initialize(Path.java:251)
... 7 more
问题解决-URISyntaxException:
修改前
修改后
修改完成后,日志里报错没有了,但是hbase shell中查询list时仍然报错: ERROR:KeeperErrorCode = NoNode for /hbase/master
问题描述:
刚启动hbase之后使用jps查看进程时,HMaster和HRegionServer进程都在,过一会再jps查看时只剩下HRegionServer进程了。
问题分析:
排除了zookeeper问题和版本兼容问题,最后推断出是因为HMster宕机出现ERROR:KeeperErrorCode = NoNode for /hbase/master 报错的,所以解决HMaster宕机问题也就解决了ERROR:KeeperErrorCode = NoNode for /hbase/master报错
问题解决-ERROR:KeeperErrorCode = NoNode for /hbase/master:
---以下是在我这种情况下解决报错的方法--
在hbase-site.xml文件中追加:
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
将$HBASE_HOME/lib/client-facing-thirdparty/htrace-core4-4.2.0-incubating.jar jar包拷贝到$HBASE_HOME/lib 目录下
cp $HBASE_HOME/lib/client-facing-thirdparty/htrace-core4-4.2.0-incubating.jar $HBASE_HOME/lib
参考: