我正在努力让我的HBase shell运行起来。 它在主题行中抛出了上述异常。我已经检查过hbase-site.xml与hadoop完全匹配。
请帮忙。我挣扎了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>
核心-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>
答案 0 :(得分:1)
确保zookeeper在2222端口上运行,在zookeeper / conf / zoo.cfg中应该有entery
# the port at which the clients will connect
clientPort=2222
或将其设为2181,按./zkServer.sh start
启动zookeeper
并在hbase-site.xml中更改此默认端口
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>