hbase master 没有启动
Posted
技术标签:
【中文标题】hbase master 没有启动【英文标题】:hbase master not starting 【发布时间】:2018-10-15 13:25:30 【问题描述】:我在独立模式下运行 HBase on Hadoop。我已经成功安装了 hadoop、zookeeper 和 hbase,但是在 hbase 中 master 没有启动。下面是我的 hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/kumar/hdata/zookeeper</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
</configuration>
我已经启动了hadoop和zookeeper服务:
start-all.sh
zkServer.sh start
start-hbase.sh
以及我在 Jps 命令中得到的进程
2133 DataNode
1974 NameNode
2679 NodeManager
2365 SecondaryNameNode
3917 QuorumPeerMain
2527 ResourceManager
3935 Jps
Hbase shell 已成功启动,但是当我在 shell 中运行任何命令(如“list”)时,出现以下错误:
ERROR: KeeperErrorCode = NoNode for /hbase/master
之后我尝试使用以下命令运行 master
hbase master start
我得到以下错误:
2018-10-15 18:51:51,380 ERROR [main] server.ZooKeeperServer: ZKShutdownHandler is not registered, so ZooKeeper server won't take any action on ERROR or SHUTDOWN server state changes
2018-10-15 18:51:51,437 INFO [NioserverCxn.Factory:0.0.0.0/0.0.0.0:2182] server.NIOServerCnxnFactory: Accepted socket connection from /127.0.0.1:34034
2018-10-15 18:51:51,479 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2182] server.ServerCnxn: The list of known four letter word commands is : [1936881266=srvr, 1937006964=stat, 2003003491=wchc, 1685417328=dump, 1668445044=crst, 1936880500=srst, 1701738089=envi, 1668247142=conf, 2003003507=wchs, 2003003504=wchp, 1668247155=cons, 1835955314=mntr, 1769173615=isro, 1920298859=ruok, 1735683435=gtmk, 1937010027=stmk]
2018-10-15 18:51:51,479 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2182] server.ServerCnxn: The list of enabled four letter word commands is : [[wchs, stat, stmk, conf, ruok, mntr, srvr, envi, srst, isro, dump, gtmk, crst, cons]]
2018-10-15 18:51:51,479 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2182] server.NIOServerCnxn: Processing stat command from /127.0.0.1:34034
2018-10-15 18:51:51,485 INFO [Thread-2] server.NIOServerCnxn: Stat command output
2018-10-15 18:51:51,491 INFO [main] zookeeper.MiniZooKeeperCluster: Started MiniZooKeeperCluster and ran successful 'stat' on client port=2182
Could not start ZK at requested port of 2181. ZK was started at port: 2182. Aborting as clients (e.g. shell) will not be able to find this ZK quorum.
2018-10-15 18:51:51,497 ERROR [main] master.HMasterCommandLine: Master exiting
java.io.IOException: Could not start ZK at requested port of 2181. ZK was started at port: 2182. Aborting as clients (e.g. shell) will not be able to find this ZK quorum.
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:217)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:140)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:149)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2983)
2018-10-15 18:51:51,500 INFO [Thread-2] server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:34034 (no session established for client)
我也没有收到本地 hbase 网址的任何响应
localhost:60010
【问题讨论】:
在HBASE_HOME/conf
路径中分享文件hbase-site.xml
的内容。
共享已存在问题
您是使用内置的 HBae Zookeeper 还是安装了单独的 Zookeeper?
最初我使用内置并得到错误,但即使在安装 zookeeeper 后我也得到同样的错误
【参考方案1】:
HBase 有一个内置的 Zookeeper 实例,仅用于开发环境,默认情况下,当您通过命令 start-hbase.sh
启动 HBase 时,它也会启动 Zookeeper 守护进程。该错误是因为您已经启动了一个使用端口2181
的独立 Zookeeper。当您启动 HBase 时,它也会尝试在端口 2181
中启动它的内置 zookeeper,但它得到了错误!
如果你想使用独立的Zookeeper组件,首先编辑文件hbase-env.sh
并添加行:export HBASE_MANAGES_ZK=false
(你也可以在文件中搜索HBASE_MANAGES_ZK变量并将其设置为false
)。所以现在当你启动 HBase 时,它只是启动 HBase Daemon 而不再是 Zookeeper。请记住,您应该在 HBase 之前启动 Zookeeper 守护进程。
【讨论】:
我编辑了文件并停止了所有服务并以下面的方式重新启动 start-all.sh zkServer.sh start start-hbase.sh 并且在 hbase shell 中仍然出现相同的错误:“错误:KeeperErrorCode = NoNode for /hbase/master”和运行“hbase master.start”命令时出现同样的错误 启动zkCli.sh
并检查是否在zookeeper中创建了hbase目录,在zookeeper命令行中尝试命令ls /
。
不,没有名为 hbase 的目录,只有一个目录,即 zookeeper。 hbase 的 localhost url 也没有打开[问题已编辑]以上是关于hbase master 没有启动的主要内容,如果未能解决你的问题,请参考以下文章
hbase启动错误:master日志:/hbase/master already exists
hbase启动之后master和regionserver相继自动断掉
HBASE启动失败,Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster
Hbase启动出问题 master.HMaster: Failed to become active master
hbase启动master挂掉解决的几种办法 | base 和 Hadoop版本问题
hbase启动错误,masterLOG,Failed construction of Master Causedby:java.net.BindException: 无法指定被