The node /hbase-unsecure is not in ZooKeeper.

来源:互联网 发布:什么是返利网和淘宝客 编辑:程序博客网 时间:2024/05/29 10:17

重点内容

首先先确认您的Hadoop版本与Hbase是否兼容,否则一切都是扯淡
各hbase版本对hadoop各版本的支持情况

之前以为单机式Hadoop不需要配置hbase.cluster.distributed,遂在hbase-site.xml中将其删除导致以下错误:

2016-08-15 23:20:36,028 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase-unsecure is not in ZooKeeper. It shoulne configured in the master.

或者

2016-08-15 22:53:06,127 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

解决方法:
将hbase-site.xml修改如下:

<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!--/** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements.  See the NOTICE file * distributed with this work for additional information * regarding copyright ownership.  The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License.  You may obtain a copy of the License at * *     http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */--><configuration>    <property>        <name>hbase.rootdir</name>        <value>hdfs://hadoop.master:9000/hbase</value>    </property>    <property>        <name>hbase.zookeeper.property.dataDir</name>        <value>/home/hadoop/zookeeper/data</value>    </property>**<property>      <name>hbase.cluster.distributed</name>      <value>true</value>    </property>**    <property>        <name>hbase.zookeeper.property.clientPort</name>        <value>2181</value>    </property>     <property>        <name>zookeeper.znode.parent</name>        <value>/hbase-unsecure</value>    </property>    <property>         <name>hbase.zookeeper.quorum</name>         <value>localhost</value>    </property>    <property>         <name>dfs.replication</name>         <value>1</value>    </property>    <property>         <name>hbase.zookeeper.quorum</name>         <value>localhost</value>    </property>    <property>        <name>hbase.master</name>         <value>hadoop.master:60000</value>        </property></configuration>

重点内容
验证:
1.启动HBASE
2.JPS

[root@hadoop hbase]# bin/start-hbase.shstarting master, logging to /usr/hbase/bin/../logs/hbase-root-master-hadoop.master.outhadoop.master: starting regionserver, logging to /usr/hbase/bin/../logs/hbase-root-regionserver-hadoop.master.out[root@hadoop hbase]# jps26704 OperateTable15185 ResourceManager23522 QuorumPeerMain14195 NameNode14323 DataNode15283 NodeManager14486 SecondaryNameNode26472 OperateTable30730 Jps18366 org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar30446 HMaster
0 0
原创粉丝点击