ERRO: Não é possível obter o endereço principal do zookeeper; dados do znode == null

0

Eu tenho two linux a máquina um é master machine(192.168.8.174) e outra é slave1 machine(192.168.8.173) . Eu instalei e configurei Hadoop 2.6.0 no modo totalmente distribuído com sucesso. A saída do Hadoop também vem perfeitamente. Eu instalei e configurei HBase 1.0 .i usei hbase default zookeeper .i didn't installed separate zookeeper .Quando eu inicio o hbase ele mostra erro em hbase log file como abaixo

2015-03-21 09:23:15,676 INFO  [main] zookeeper.ZooKeeper: Client environment:user.name=master
2015-03-21 09:23:15,676 INFO  [main] zookeeper.ZooKeeper: Client environment:user.home=/home/master
2015-03-21 09:23:15,676 INFO  [main] zookeeper.ZooKeeper: Client environment:user.dir=/home/master
2015-03-21 09:23:15,682 INFO  [main] zookeeper.ZooKeeper: Initiating client connection, connectString=slave1:2222,master:2222 sessionTimeout=90000 watcher=master:160200x0, quorum=slave1:2222,master:2222, baseZNode=/hbase
2015-03-21 09:23:15,762 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Opening socket connection to server master/192.168.8.174:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:15,783 WARN  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:15,899 INFO  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Opening socket connection to server slave1/192.168.8.173:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:15,900 WARN  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:15,907 WARN  [main] zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper, quorum=slave1:2222,master:2222, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
2015-03-21 09:23:15,908 INFO  [main] util.RetryCounter: Sleeping 1000ms before retry #0...
2015-03-21 09:23:17,006 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Opening socket connection to server master/192.168.8.174:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:17,007 WARN  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:17,108 INFO  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Opening socket connection to server slave1/192.168.8.173:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:17,108 WARN  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:17,109 WARN  [main] zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper, quorum=slave1:2222,master:2222, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
2015-03-21 09:23:17,109 INFO  [main] util.RetryCounter: Sleeping 2000ms before retry #1...
2015-03-21 09:23:18,210 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Opening socket connection to server master/192.168.8.174:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:18,210 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Socket connection established to master/192.168.8.174:2222, initiating session
2015-03-21 09:23:18,226 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-03-21 09:23:18,793 INFO  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Opening socket connection to server slave1/192.168.8.173:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:18,795 WARN  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:20,568 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Opening socket connection to server master/192.168.8.174:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:20,570 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Socket connection established to master/192.168.8.174:2222, initiating session
2015-03-21 09:23:20,572 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-03-21 09:23:20,672 WARN  [main] zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper, quorum=slave1:2222,master:2222, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
2015-03-21 09:23:20,672 INFO  [main] util.RetryCounter: Sleeping 4000ms before retry #2...
2015-03-21 09:23:21,418 INFO  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Opening socket connection to server slave1/192.168.8.173:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:21,419 WARN  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:23,116 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Opening socket connection to server master/192.168.8.174:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:23,116 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Socket connection established to master/192.168.8.174:2222, initiating session
2015-03-21 09:23:23,118 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-03-21 09:23:23,851 INFO  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Opening socket connection to server slave1/192.168.8.173:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:23,852 WARN  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:24,961 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Opening socket connection to server master/192.168.8.174:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:24,962 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Socket connection established to master/192.168.8.174:2222, initiating session
2015-03-21 09:23:24,964 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-03-21 09:23:25,064 WARN  [main] zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper, quorum=slave1:2222,master:2222, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
2015-03-21 09:23:25,064 INFO  [main] util.RetryCounter: Sleeping 8000ms before retry #3...
2015-03-21 09:23:25,992 INFO  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Opening socket connection to server slave1/192.168.8.173:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:25,994 WARN  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:28,070 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Opening socket connection to server master/192.168.8.174:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:28,071 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Socket connection established to master/192.168.8.174:2222, initiating session
2015-03-21 09:23:28,072 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-03-21 09:23:28,344 INFO  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Opening socket connection to server slave1/192.168.8.173:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:28,345 WARN  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:29,843 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Opening socket connection to server master/192.168.8.174:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:29,844 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Socket connection established to master/192.168.8.174:2222, initiating session
2015-03-21 09:23:29,845 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-03-21 09:23:30,925 INFO  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Opening socket connection to server slave1/192.168.8.173:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:30,926 WARN  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:32,241 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Opening socket connection to server master/192.168.8.174:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:32,242 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Socket connection established to master/192.168.8.174:2222, initiating session
2015-03-21 09:23:32,243 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-03-21 09:23:32,445 INFO  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Opening socket connection to server slave1/192.168.8.173:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:32,446 WARN  [main-SendThread(slave1:2222)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2015-03-21 09:23:34,335 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Opening socket connection to server master/192.168.8.174:2222. Will not attempt to authenticate using SASL (unknown error)
2015-03-21 09:23:34,337 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Socket connection established to master/192.168.8.174:2222, initiating session
2015-03-21 09:23:34,339 INFO  [main-SendThread(master:2222)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-03-21 09:23:34,440 WARN  [main] zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper, quorum=slave1:2222,master:2222, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
2015-03-21 09:23:34,440 ERROR [main] zookeeper.RecoverableZooKeeper: ZooKeeper create failed after 4 attempts
2015-03-21 09:23:34,440 ERROR [main] master.HMasterCommandLine: Master exiting
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster
    at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1982)
    at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:198)
    at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:139)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)
    at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1996)
Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
    at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.createNonSequential(RecoverableZooKeeper.java:512)
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.create(RecoverableZooKeeper.java:491)
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.createWithParents(ZKUtil.java:1252)
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.createWithParents(ZKUtil.java:1230)
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.createBaseZNodes(ZooKeeperWatcher.java:174)
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<init>(ZooKeeperWatcher.java:167)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:531)
    at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:333)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1977)
    ... 5 more

mas quando eu uso jps , ele está sendo executado no prompt de comando, como abaixo

    master machine                  slave1 machine

    HMaster                         HQuorumpeer                         
    HQuorumpeer                     RegionServer
    HRegionServer

meus hbase configuration files são

máquina mestre - hbase-site.xml

<configuration>
     <property>
         <name>hbase.master</name>
         <value>master:9000</value>
     </property> 
    <property>
         <name>hbase.rootdir</name>
         <value>hdfs://master:54310/hbase</value>
     </property> 
     <property>
            <name>hbase.cluster.distributed</name>
            <value>true</value>
     </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/home/master/hbase/zookeeper</value>
    </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>master,slave1</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2181</value>
    </property>
    </configuration>

máquina slave1 - hbase-site.xml

<configuration>
        <property>
             <name>hbase.rootdir</name>
             <value>hdfs://master:54310/hbase</value>
         </property> 
         <property>
                <name>hbase.cluster.distributed</name>
                <value>true</value>
         </property>
        </configuration>

e

master /etc/hosts

192.168.8.174     master
192.168.8.173     slave1

slave1 /etc/hosts

192.168.8.174     master
192.168.8.173     slave1

e eu testei ambos Boolean para HBASE_MANAGES_ZK é verdadeiro ou falso em hbase-env.sh mas ainda não consegui encontrar

eu não sei o que eu estou enganado dar alguma solução ..

    
por user430092 21.03.2015 / 03:04

1 resposta

0

Eu tenho KeeperErrorCode = ConnectionLoss para a exceção / hbase, mas seguindo o trabalho de configuração para mim: Alterar no hbase-env.sh:

export HBASE_MANAGES_ZK=true

Mude o seguinte em ams-hbase-site:

                <configuration>
                <property> 
                <name>hbase.zookeeper.quorum</name> 
                <value>zknode1,zknode2,zknode3,zknode4</value> 
                </property>
                <property>
                <name>hbase.rootdir</name>
                <value>hdfs://localhost:8020/hbase</value>
                </property>
                <property> 
                <name>hbase.cluster.distributed</name> 
                <value>true</value> 
                </property> 
                <property>
                <name>hbase.zookeeper.property.clientPort</name>
                <value>2181</value> 
                </property>
                </configuration> 

Adicione todos os seus nós do zookeeper em hbase.zookeeper.quorum.

If above config not work for you then add following property in Advanced ams-hbase-security-site:
 zookeeper.znode.parent= /hbase
    
por 11.03.2016 / 07:27

Tags