hbase未连接到zookeeper

jvlzgdj9  于 2021-05-30  发布在  Hadoop
关注(0)|答案(1)|浏览(433)

我正在努力让我的hbase shell运行。它在主题行中抛出了上面的异常。我已经检查了hbase-site.xml是否与hadoop-one完全匹配。
请帮忙。我挣扎了2天,有一个项目到期。我附上了hadoop和hbase的两个xml文件。
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>
qyyhg6bp

qyyhg6bp1#

确保zookeeper正在2222端口上运行,并且zookeeper/conf/zoo.cfg中应该有entery


# the port at which the clients will connect

clientPort=2222

或者是2181,从 ./zkServer.sh start 并在hbase-site.xml中更改此默认端口

<property>
      <name>hbase.zookeeper.property.clientPort</name>
      <value>2181</value>
   </property>

相关问题