내 로컬 Ubuntu 컴퓨터에서 HBase 셸에 연결할 수 없습니다. 인터넷 전체를 살펴 보았습니다. 무엇이 잘못되었는지 알 수 없습니다. 로그에 이 오류가 계속 표시됩니다.
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>
핵심 사이트.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>
답변1
Zookeper에 기본이 아닌 포트를 사용하고 있으므로 Zookeeper 구성 파일에 동일한 포트가 있는지 확인하십시오.동물원.cfg clientPort=2222로
또한 귀하의hbase-env.sh파일에는 아래 줄이 있습니다.
export HBASE_MANAGES_ZK=true
또한 우분투의 경우/etc/호스트파일에 루프백 문제가 없습니다. 아래와 비슷한 줄이 있어야 합니다.
127.0.0.1 localhost