7

我一直在努力让 Hbase 在我的机器上工作。我相信我的设置有问题,我无法修复它。我得到 master not running 错误,但 Jsp 清楚地显示它正在运行。启动 Hadoop 和 Hbase 后。我做了JPS

yeshwanthvenkatesh@mymachineip /usr/local/Cellar/hbase/0.94.4/bin (master)$ jps
1609 Main
715 DataNode
985 TaskTracker
614 NameNode
886 JobTracker
1463 HRegionServer
1263 HQuorumPeer
814 SecondaryNameNode
1695
1349 HMaster
1842 Jps

当我尝试在 Hbase shell 中调用命令时,出现以下错误。

hbase(main):001:0> list
TABLE
2013-04-25 16:20:28.933 java[1609:1703] Unable to load realm info from SCDynamicStore

ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 times

Here is some help for this command:
List all tables in hbase. Optional regular expression parameter could
be used to filter the output. Examples:

  hbase> list
  hbase> list 'abc.*'

hbase(main):002:0> scan 'ResultStore'
ROW                                                  COLUMN+CELL
13/04/25 16:26:13 INFO ipc.HBaseRPC: Problem connecting to server: mymachineip/129.10.3.181:60020

这是我的 site.xml

<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://129.10.3.181:8020/hbase</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/Users/yeshwanthvenkatesh/Documents/Hadoop/zookeeper</value>
    </property>
    <property>
        <name>hbase.master</name>
        <value>129.10.3.181:60000</value>
        <description>The host and port that the HBase master runs at.</description>
    </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>129.10.3.181</value>
    </property>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>
    <property>
        <name>hbase.regionserver.port</name>
        <value>60020</value>
        <description>The host and port that the HBase master runs at.</description>
    </property>
    <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2181</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/Users/yeshwanthvenkatesh/Documents/Hadoop/Daemons/zookeeper</value>
    </property>
</configuration>

这是我的 etc/hosts 文件

127.0.0.1       localhost
129.10.3.181  mymachineip
255.255.255.255 broadcasthost
# For Hadoop
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

我没有管理 Zookeeper 实例,所以我在我的 hbase-env.sh 中将其设置为 true。我做错了什么?日志也没有太大帮助。

13/04/25 16:08:52 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=129.10.3.181:2181 sessionTimeout=180000 watcher=hconnection
13/04/25 16:08:52 INFO zookeeper.ClientCnxn: Opening socket connection to server mymachineip/129.10.3.181:2181. Will not attempt to authenticate using SASL (unknown error)
13/04/25 16:08:52 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 2310@mymachineip
13/04/25 16:08:52 INFO zookeeper.ClientCnxn: Socket connection established to mymachineip/129.10.3.181:2181, initiating session
13/04/25 16:08:53 INFO zookeeper.ClientCnxn: Session establishment complete on server mymachineip/129.10.3.181:2181, sessionid = 0x13e42c9a109000a, negotiated timeout = 180000
13/04/25 16:08:53 INFO client.HConnectionManager$HConnectionImplementation: getMaster attempt 0 of 1 failed; no more retrying.
org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet
    at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1415)

    at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:1021)
    at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:150)
    at sun.proxy.$Proxy5.getProtocolVersion(Unknown Source)
    at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getProxy(WritableRpcEngine.java:183)
    at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:335)
    at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:312)
    at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:364)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:682)
    at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:113)
    at org.apache.hadoop.hbase.master.HMasterCommandLine.stopMaster(HMasterCommandLine.java:175)
    at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:106)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
    at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1928)
13/04/25 16:08:53 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x13e42c9a109000a
13/04/25 16:08:53 INFO zookeeper.ZooKeeper: Session: 0x13e42c9a109000a closed
13/04/25 16:08:53 INFO zookeeper.ClientCnxn: EventThread shut down
13/04/25 16:08:53 ERROR master.HMasterCommandLine: Master not running
4

5 回答 5

0

从您的日志和主机文件中,我看不出您的配置有任何问题。所以可能是版本不兼容的问题。我也遇到了同样的问题,所以我更改了我的 hbase 版本,下载了 hbase-0.94.11 以及 zookeeper-3.4.3、hadoop 1.0.1 并且工作正常。虽然我没有找到问题的任何具体原因,但它工作正常。

于 2013-10-15T19:18:18.017 回答
0

HBase Master 节点未启动。一切似乎都已正确配置,因此您需要执行:

$ ./bin/start-hbase.sh
于 2018-09-08T15:06:37.237 回答
0

看来您的名称节点或数据节点处于安全模式。所以我们需要离开安全模式在hdfs中插入数据或者在hdfs中插入hbase表。我们可以使用以下命令离开namenode或datanode的安全模式:

hdfs dfsadmin -safemode leave

成功执行后,将显示此消息:

安全模式已关闭

并且在没有发生上述错误并且 hbase shell 正常运行之后。

于 2018-09-08T12:57:53.143 回答
0

如果您正在使用hbase 0.94,则存在错误。您需要使用roodir而不是rootdirinhbase-site.xml

<property>
    <name>hbase.roodir</name>
    <value>hdfs://localhost:9000/hbase</value>
</property>
于 2016-02-28T13:39:32.067 回答
0

最好使用 HBase 的最新稳定版本,即 1.2x。1.1x 也很流行。如果您尝试在本地计算机上运行 hadoop 和 Hbase,则无需单独启动它。

从https://hbase.apache.org/下载最新版本

于 2018-01-23T07:15:28.553 回答