Hbase启动之后无法访问web监控页面,Hmaster进程自动退出,报错:“TableExistsException:hbase:namespace”

最近在启动hbase之后无法访问web监控页面,查看jps进程Hmaster在刚启动hbase的时候存在,过一会再看的时候就没有了。查看日志报错内容是:“TableExistsException:hbase:namespace”。
网上查询资料原因是zookeeper中保存的/hbase信息与实际不匹配,但是我本地也没有装多个版本,后来想到之前格式化了hadoop的namenode节点,可能跟这个又关系,所以导致zookeeper中保留的hbase内容冲突,所以删除zookeeper中/hbase,然后重启hbase,问题解决。
1、进入zookeeper目录bin下面,执行zkCli.sh,进入zookeeper客户端程序;

[root@master bin]# zkCli.sh
Connecting to localhost:2181
2019-03-22 09:53:42,847 [myid:] - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT
2019-03-22 09:53:42,850 [myid:] - INFO  [main:Environment@100] - Client environment:host.name=master
2019-03-22 09:53:42,850 [myid:] - INFO  [main:Environment@100] - Client environment:java.version=1.8.0_201
2019-03-22 09:53:42,850 [myid:] - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2019-03-22 09:53:42,850 [myid:] - INFO  [main:Environment@100] - Client environment:java.home=/usr/local/src/jdk1.8.0_201/jre
2019-03-22 09:53:42,850 [myid:] - INFO  [main:Environment@100] - Client environment:java.class.path=/usr/local/src/zookeeper-3.4.5/bin/../build/classes:/usr/local/src/zookeeper-3.4.5/bin/../build/lib/*.jar:/usr/local/src/zookeeper-3.4.5/bin/../lib/slf4j-log4j12-1.6.1.jar:/usr/local/src/zookeeper-3.4.5/bin/../lib/slf4j-api-1.6.1.jar:/usr/local/src/zookeeper-3.4.5/bin/../lib/netty-3.2.2.Final.jar:/usr/local/src/zookeeper-3.4.5/bin/../lib/log4j-1.2.15.jar:/usr/local/src/zookeeper-3.4.5/bin/../lib/jline-0.9.94.jar:/usr/local/src/zookeeper-3.4.5/bin/../zookeeper-3.4.5.jar:/usr/local/src/zookeeper-3.4.5/bin/../src/java/lib/*.jar:/usr/local/src/zookeeper-3.4.5/bin/../conf:
2019-03-22 09:53:42,850 [myid:] - INFO  [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2019-03-22 09:53:42,851 [myid:] - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2019-03-22 09:53:42,851 [myid:] - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>
2019-03-22 09:53:42,851 [myid:] - INFO  [main:Environment@100] - Client environment:os.name=Linux
2019-03-22 09:53:42,851 [myid:] - INFO  [main:Environment@100] - Client environment:os.arch=amd64
2019-03-22 09:53:42,851 [myid:] - INFO  [main:Environment@100] - Client environment:os.version=3.10.0-862.el7.x86_64
2019-03-22 09:53:42,851 [myid:] - INFO  [main:Environment@100] - Client environment:user.name=root
2019-03-22 09:53:42,851 [myid:] - INFO  [main:Environment@100] - Client environment:user.home=/root
2019-03-22 09:53:42,852 [myid:] - INFO  [main:Environment@100] - Client environment:user.dir=/usr/local/src/hbase-0.98.6-hadoop2/logs
2019-03-22 09:53:42,852 [myid:] - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@1a86f2f1
Welcome to ZooKeeper!
2019-03-22 09:53:42,871 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@966] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
JLine support is enabled
2019-03-22 09:53:42,932 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@849] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session
2019-03-22 09:53:42,943 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1207] - Session establishment complete on server localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x169a2ee9f110009, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null 

2、执行rmr /hbase

[zk: localhost:2181(CONNECTED) 0] rmr /hbase
[zk: localhost:2181(CONNECTED) 1]

3、重启hbase。
问题解决,Hmaster进程存在,监控页面可访问。

你可能感兴趣的:(hadoop)