HBase stellt keine Verbindung zu ZooKeeper her

HBase stellt keine Verbindung zu ZooKeeper her

Ich kann auf meinem lokalen Ubuntu-Rechner keine Verbindung zur HBase-Shell herstellen. Habe im ganzen Internet gesucht. Ich weiß nicht, was los ist. In den Protokollen erhalte ich immer wieder diesen Fehler -

zookeeper.RecoverableZooKeeper: Unable to create ZooKeeper Connection.

hbase-site.xml

<configuration>
  <property>
    <name>hbase.rootdir</name>    
    <value>hdfs://localhost:54310/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/hduser/zookeeper</value>
  </property>

  <property>
      <name>hbase.zookeeper.property.clientPort</name>
      <value>2222</value>
      <description>Property from ZooKeeper's config zoo.cfg.
      The port at which the clients will connect.
      </description>
  </property>

    <property>
      <name>hbase.zookeeper.quorum</name>
      <value>localhost</value>
      <description>Comma separated list of servers in the ZooKeeper Quorum.
      </description>
    </property>

</configuration>

core-site.xml

<configuration>
<property>
  <name>hadoop.tmp.dir</name>
  <value>/app/hadoop/tmp</value>
  <description>A base for other temporary directories.</description>
</property>

<property>
  <name>fs.default.name</name>
  <value>hdfs://localhost:54310</value>
  <description>The name of the default file system.</description>
</property>

</configuration>

Antwort1

Da Sie einen nicht standardmäßigen Port für Zookeeper verwenden, stellen Sie sicher, dass dieser in der Zookeeper-Konfigurationsdatei vorhanden ist.zoo.cfg als clientPort=2222

Stellen Sie außerdem sicher, dass Ihrehbase-env.shDie Datei hat die folgende Zeile.

export HBASE_MANAGES_ZK=true   

auch für Ubuntu stellen Sie sicher, dass Ihre/etc/hostsDie Datei hat kein Loopback-Problem. Sie sollte eine Zeile ähnlich der folgenden enthalten.

127.0.0.1 localhost

verwandte Informationen