BIGE_BIGGER
BIGE_BIGGER
采纳率10%
2019-03-08 13:09

habase 报错 ERROR: Can't get master address from ZooKeeper; znode data == null

40

hadoop + zookeeper +hbase 环境
hadoop 和 zookeeper 集群环境都ok,hbase启动之后,查看hbase状态报错
图片说明

网上的各种重启hbase 重启服务 修改配置文件都试过了,解决不了,跪求会的大神指导一下。

/etc/profile配置

    export  JAVA_HOME=/opt/java/jdk1.8.0_201
    export  HADOOP_HOME=/opt/hadoop/hadoop-2.8.0
    export  HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
    export  HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_HOME}/lib/native
    export  HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib"
    #export  HIVE_HOME=/opt/hive/apache-hive-2.1.1-bin
    #export  HIVE_CONF_DIR=${HIVE_HOME}/conf
    #export  SQOOP_HOME=/opt/sqoop/sqoop-1.4.6.bin__hadoop-2.0.4-alpha
    export  HBASE_HOME=/opt/hbase/hbase-1.4.9
    export  ZK_HOME=/opt/zookeeper/zookeeper-3.4.13
    export  CLASS_PATH=.:${JAVA_HOME}/lib:${HIVE_HOME}/lib:$CLASS_PATH
    export PATH=.:${JAVA_HOME}/bin:${HADOOP_HOME}/bin:${HADOOP_HOME}/sbin:${SPARK_HOME}/bin:${ZOOKEEPER_HOME}/bin:${HIVE_HOME}/bin:${SQOOP_HOME}/bin:${HBASE_HOME}:${ZK_HOME}/bin:$PATH

hbase/conf/hbase.xml 配置

<configuration>
<property>
 <name>hbase.rootdir</name>
 <value>hdfs://hadoop1:9000/hbase</value>
 <description>The directory shared byregion servers.</description>
</property>
 <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/opt/hbase/zk_data</value>
  </property>
<property>
 <name>hbase.zookeeper.property.clientPort</name>
 <value>2181</value>
 <description>Property from ZooKeeper'sconfig zoo.cfg. The port at which the clients will connect.
 </description>
</property>
<property>
 <name>zookeeper.session.timeout</name>
 <value>120000</value>
</property>
<property>
  <name>hbase.zookeeper.property.tickTime</name>
  <value>6000</value>
</property>
<property>
 <name>hbase.zookeeper.quorum</name>
 <value>hadoop1,hadoop2,hadoop3</value>
</property>
<property>
 <name>hbase.tmp.dir</name>
 <value>/root/hbase/tmp</value>
</property>
<property>
 <name>hbase.cluster.distributed</name>
 <value>true</value>
</property>
</configuration>

hbase/conf/conf/hbase-env.sh文件

export HBASE_OPTS="-XX:+UseConcMarkSweepGC"

# Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+
#export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"
#export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"
export JAVA_HOME=/opt/java/jdk1.8.0_201
export HADOOP_HOME=/opt/hadoop/hadoop-2.8.0
export HBASE_HOME=/opt/hbase/hbase-1.4.9
export HBASE_CLASSPATH=/opt/hadoop/hadoop-2.8.0/etc/hadoop
export HBASE_PID_DIR=/root/hbase/pids
export HBASE_MANAGES_ZK=false

zookeeper/zoo.cfg 配置文件

tickTime=2000
initLimit=10
syncLimit=5
clientPort=2181
dataDir=/opt/zookeeper/data
dataLogDir=/opt/zookeeper/dataLog
server.1=hadoop1:2886:3881
server.2=hadoop2:2887:3882
server.3=hadoop3:2888:3883
quorumListenOnAllIPs=true

/opt/hadoop/hadoop-2.8.0/etc/hadoop/core-site.xml 文件

<configuration>
<property>

        <name>hadoop.tmp.dir</name>

        <value>/root/hadoop/tmp</value>

        <description>Abase for other temporary directories.</description>

   </property>

   <property>

        <name>fs.default.name</name>

        <value>hdfs://hadoop1:9000</value>

   </property>
</configuration>

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

相关推荐