无法连接到zookeeper,然后hbase master关闭

时间:2012-09-26 17:40:08

标签: java hbase apache-zookeeper

我在几次尝试后使用hbase 0.94.1和zookeeper 3.3.6,hbase的主人关闭并且sw退出

这些是我从shell获得的错误

12/09/26 18:58:35 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
12/09/26 18:58:35 INFO zookeeper.ClientCnxn: Opening socket connection to server /127.0.0.1:2181
12/09/26 18:58:35 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 5133@xxx-xxx
12/09/26 18:58:35 INFO zookeeper.ClientCnxn: Socket connection established to localhost/127.0.0.1:2181, initiating session
12/09/26 18:58:35 WARN zookeeper.ClientCnxnSocket: Connected to an old server; r-o mode will be unavailable
12/09/26 18:58:35 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x13a037edbb2000c, negotiated timeout = 40000
12/09/26 18:58:36 ERROR client.HConnectionManager$HConnectionImplementation: Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
12/09/26 18:58:36 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x13a037edbb2000c
12/09/26 18:58:36 INFO zookeeper.ZooKeeper: Session: 0x13a037edbb2000c closed
12/09/26 18:58:36 INFO zookeeper.ClientCnxn: EventThread shut down

org.apache.hadoop.hbase.MasterNotRunningException: Retried 10 times
    at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:127)
    at util.HBaseHelper.<init>(HBaseHelper.java:29)
    at util.HBaseHelper.getHelper(HBaseHelper.java:33)
    at driver.ABoxHbaseTableMaker.makeTable(ABoxHbaseTableMaker.java:39)
    at driver.ABoxImporterDriver.run(ABoxImporterDriver.java:55)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
    at driver.ABoxImporterDriver.main(ABoxImporterDriver.java:32)
    at gui.Main.jButton1ActionPerformed(Main.java:274)
    at gui.Main.access$3(Main.java:241)
    at gui.Main$5.actionPerformed(Main.java:160)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    ...

T试图改变端口,但没有。

这些是配置文件:

zoo.cfg:

tickTime=2000
dataDir=/home/.../.../zookeeper-3.3.6/data
clientPort=2181

HBase的-site.xml中

<configuration>
<property>
    <name>hbase.rootdir</name>
    <value>file:///home/.../.../hbase-0.94.1/hbDATA/</value>
  </property>
 <property>
    <name>hbase.zookeeper.quorum</name>
    <value>localhost</value>
 </property>
 <property>
    <name>zookeeper.znode.parent</name>
    <value>file:///home/.../.../hbase-0.94.1/hbDATA/</value>
 </property>
 <property>
    <name>hbase.zookeeper.property.clientPort</name>
    <value>2181</value>
 </property>
</configuration>

1 个答案:

答案 0 :(得分:0)

如果你在独立模式下使用HBase,你甚至不需要所有这些属性。虽然,伪模式或完全分布模式需要额外的设置。通过查看你的配置道具,我假设你正在使用HBase处于本地模式。所以你可以跳过所有这些事情。对于伪分布式模式,HBase的默认ZK就足够了。