복붙노트

[HADOOP] 사육사 오류에 대한 Hbase 연결

HADOOP

사육사 오류에 대한 Hbase 연결

환경 : 우분투 14.04, hadoop-2.2.0, hbase-0.98.7

내가 hadoop과 hbase (단일 노드 모드)를 시작했을 때, 모두 성공했다. (hadoop은 8088 웹 사이트, hbase는 60010)

jps
4507 SecondaryNameNode
5350 HRegionServer
4197 NameNode
4795 NodeManager
3948 QuorumPeerMain
5209 HMaster
4678 ResourceManager
5831 Jps
4310 DataNode

하지만 hbase-hadoop-master-localhost.log를 확인하면 다음과 같은 정보가 있습니다.

    2014-10-23 14:16:11,392 INFO  [main-SendThread(localhost:2181)] zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2014-10-23 14:16:11,426 INFO  [main-SendThread(localhost:2181)] zookeeper.ClientCnxn: Socket connection established to localhost/127.0.0.1:2181, initiating session

그 알 수없는 오류 문제에 대한 웹 사이트를 구글 많이 가지고 있지만이 문제를 해결할 수 없습니다 ... 다음은 내 hadoop 및 hbase 구성입니다.

하둡 :

콘텐츠 담기 : localhost

core-site.xml

<configuration>
    <property>
         <name>fs.defaultFS</name>
         <value>hdfs://localhost:8020</value>
     </property>
</configuration>

yarn-site.xml

<configuration>
  <property>
    <name>yarn.resourcemanager.resource-tracker.address</name>
    <value>localhost:9001</value>
    <description>host is the hostname of the resource manager and 
    port is the port on which the NodeManagers contact the Resource Manager.
    </description>
  </property>

  <property>
    <name>yarn.resourcemanager.scheduler.address</name>
    <value>localhost:9002</value>
    <description>host is the hostname of the resourcemanager and port is the port
    on which the Applications in the cluster talk to the Resource Manager.
    </description>
  </property>

  <property>
    <name>yarn.resourcemanager.scheduler.class</name>
    <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler</value>
    <description>In case you do not want to use the default scheduler</description>
  </property>

  <property>
    <name>yarn.resourcemanager.address</name>
    <value>localhost:9003</value>
    <description>the host is the hostname of the ResourceManager and the port is the port on
    which the clients can talk to the Resource Manager. </description>
  </property>

  <property>
    <name>yarn.nodemanager.local-dirs</name>
    <value></value>
    <description>the local directories used by the nodemanager</description>
  </property>

  <property>
    <name>yarn.nodemanager.address</name>
    <value>localhost:9004</value>
    <description>the nodemanagers bind to this port</description>
  </property>  

  <property>
    <name>yarn.nodemanager.resource.memory-mb</name>
    <value>10240</value>
    <description>the amount of memory on the NodeManager in GB</description>
  </property>

  <property>
    <name>yarn.nodemanager.remote-app-log-dir</name>
    <value>/app-logs</value>
    <description>directory on hdfs where the application logs are moved to </description>
  </property>

   <property>
    <name>yarn.nodemanager.log-dirs</name>
    <value></value>
    <description>the directories used by Nodemanagers as log directories</description>
  </property>

  <property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
    <description>shuffle service that needs to be set for Map Reduce to run </description>
  </property>
</configuration>

Hbase :

hbase-env.sh :

..
export JAVA_HOME="/usr/lib/jvm/java-7-oracle"
..
export HBASE_MANAGES_ZK=true
..

hbase-site.xml

<configuration>
    <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>  

영역 서버 내용 : localhost

내 / etc / hosts 내용 :

127.0.0.1       localhost
#127.0.1.1      localhost

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

나는 그것을 해결하기 위해 많은 방법을 시도하지만 모두 실패합니다. 제발 해결하도록 도와주세요. 정말 해결할 방법을 알아야합니다.

원래는 mapreduce 프로그램을 실행했고 67 %의 맵이 0 %를 줄이면 일부 정보를 출력하고 일부 정보는 다음과 같습니다.

14/10/23 15:50:41 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=60000 watcher=org.apache.hadoop.hbase.client.HConnectionManager$ClientZKWatcher@ce1472
14/10/23 15:50:41 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
14/10/23 15:50:41 INFO zookeeper.ClientCnxn: Socket connection established to localhost/127.0.0.1:2181, initiating session
14/10/23 15:50:41 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x1493be510380007, negotiated timeout = 40000
14/10/23 15:50:43 INFO mapred.LocalJobRunner: map > sort
14/10/23 15:50:46 INFO mapred.LocalJobRunner: map > sort

그런 다음 충돌이 일어난다. 나는 프로그램이 죽은 자물쇠에 있다고 생각한다. 그리고 그것은 내가 사육사 문제를 해결하기를 원하는 것이다.

hadoop이나 hbase 등 다른 설정 파일을 원한다면, 내가 알려줄 게. 감사!

해결법

  1. ==============================

    1.나는 사육사가 당신 문제라고 생각하지 않습니다. 지도 / 작업 상태를 줄이기에 대한 자세한 정보는 다른 로그를 봐야합니다. 원사 작업 추적기를 통해 원사 로그 메시지와 함께 오류가 있는지 datanode 및 namenode 로그를 확인하십시오.

    나는 사육사가 당신 문제라고 생각하지 않습니다. 지도 / 작업 상태를 줄이기에 대한 자세한 정보는 다른 로그를 봐야합니다. 원사 작업 추적기를 통해 원사 로그 메시지와 함께 오류가 있는지 datanode 및 namenode 로그를 확인하십시오.

    동물원 메시지

    그 메시지는 사육사가 사육사 sasl 클라이언트와 연결을 시도하는 메시지입니다. sasl이 구성되지 않으면 클라이언트는 계속 연결할 수 있지만 연결은 인증되지 않습니다.

    이 파일에서 오는 오류 메시지 ZooKeeperSaslClient.java

    150                 // The user did not override the default context. It might be that they just don't intend to use SASL,
    151                 // so log at INFO, not WARN, since they don't expect any SASL-related information.
    152                 String msg = "Will not attempt to authenticate using SASL ";
    153                 if (runtimeException != null) {
    154                     msg += "(" + runtimeException + ")";
    155                 } else {
    156                     msg += "(unknown error)";
    157                 }
    158                 this.configStatus = msg;
    159                 this.isSASLConfigured = false;
    160             }
    

    오류를 제거하려면 sasl을 사용하도록 사육사를 구성해야합니다. 죄송합니다. sasl for zookeeper 구성에 대한 경험이 없습니다.

    ZooKeeper SASL 설정

  2. ==============================

    2.hbase-site.xml 파일에 다음 특성을 추가하십시오.

    hbase-site.xml 파일에 다음 특성을 추가하십시오.

     <property>
     <name>hbase.zookeeper.quorum</name>
     <value>192.168.56.101</value>                       #this is my server ip
     </property>
     <property>
     <name>hbase.zookeeper.property.clientPort</name>
     <value>2181</value>
     </property>
    

    ./start-hbase.sh를 다시 시작하십시오.

  3. ==============================

    3.이것이 내가 classpath에서 hbase-site.xml을 포함시키고 -Dhbase.zookeeper.quorum처럼 사육사 쿼럼 값을주고 시도한 후에도 해결 한 방법입니다 - 그리고 그들은 작동하지 않았습니다. hbase-site.xml을 내 jar 파일과 동일한 폴더에 복사 한 다음 jar uf myjar.jar hbase-site.xml

    이것이 내가 classpath에서 hbase-site.xml을 포함시키고 -Dhbase.zookeeper.quorum처럼 사육사 쿼럼 값을주고 시도한 후에도 해결 한 방법입니다 - 그리고 그들은 작동하지 않았습니다. hbase-site.xml을 내 jar 파일과 동일한 폴더에 복사 한 다음 jar uf myjar.jar hbase-site.xml

    그리고 나서 hadoop jar myjar를 실행했습니다.

    이 문제가 해결되었습니다.

  4. from https://stackoverflow.com/questions/26522513/hbase-connection-about-zookeeper-error by cc-by-sa and MIT license