HBase master nicht gestartet, Kann keine Verbindung mit hbase.rootdir

Ich versuche zu laufen, HBase in einem pseudo-distributed-Modus basierend auf dem setup auf der website von apache, aber ich habe Probleme beim konfigurieren des hbase.root-Verzeichnis korrekt.

Dies ist, wie meine Konfigurationsdateien sehen so aus:

In Hadoop-Verzeichnis:

conf/core-site.xml:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
  <property>
    <name>fs.default.name</name>
    <value>hdfs://localhost:9000</value>
  </property>

  <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>

  <property>
    <name>mapred.job.tracker</name>
    <value>localhost:9001</value>
  </property>
</configuration>

conf/hdfs-site.xml:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>

  <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>

  <property>
    <name>dfs.support.append</name>
    <value>true</value>
  </property>

  <property>
    <name>dfs.datanode.max.xcievers</name>
    <value>4096</value>
  </property>

</configuration>

conf/mapred-site.xml:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
  <property>
    <name>mapred.job.tracker</name>
    <value>localhost:9001</value>
  </property>
</configuration>

In meinem HBase-Verzeichnis

hbase-site.xml:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 * Copyright 2010 The Apache Software Foundation
 *
 * 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>dfs.support.append</name>
    <value>true</value>
  </property>

  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://localhost:9000/hbase</value>
  </property>

  <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>

  <property>
    <name>hbase.zookeeper.quorum</name>
    <value>localhost</value>
  </property>

</configuration>

Wenn ich laufen die start-hbase.sh Skript es sagt, dass es beginnt, zookeeper, hbase master und region-server und ich bin in der Lage, an Ihnen anmelden. Ich kann dann Zugriff auf die hbase-shell, aber ich kann keine Tabellen erstellen oder sonst was. Ich habe versucht, eine Verbindung zu den master-status ui mit meinem web-browser, aber es würde nicht anschließen. Zuerst dachte ich, es war, weil ich es läuft auf eine amazon-Instanz und port 9000 nicht die Berechtigung erteilt, aber ich fand es war. Ports 50030, und 50070 gewährt die gleichen Berechtigungen und ich bin in der Lage, Zugriff auf den job-Verfolger und namenode von Ihnen. Ich habe die logs und fand diese Fehlermeldung:

2013-08-05 18:00:35,613 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
2013-08-05 18:00:35,616 FATAL org.apache.hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown.
java.net.ConnectException: Call to localhost/127.0.0.1:9000 failed on connection exception: java.net.ConnectException: Connection refused
    at org.apache.hadoop.ipc.Client.wrapException(Client.java:1136)
    at org.apache.hadoop.ipc.Client.call(Client.java:1112)
    at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229)
    at com.sun.proxy.$Proxy10.getProtocolVersion(Unknown Source)
    at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:411)
    at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:135)
    at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:276)
    at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:241)
    at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:100)
    at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1411)
    at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1429)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:254)
    at org.apache.hadoop.fs.Path.getFileSystem(Path.java:187)
    at org.apache.hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:667)
    at org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java:112)
    at org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:560)
    at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:419)
    at java.lang.Thread.run(Thread.java:724)
Caused by: java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:708)
    at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:511)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:481)
    at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:453)
    at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:579)
    at org.apache.hadoop.ipc.Client$Connection.access$2100(Client.java:202)
    at org.apache.hadoop.ipc.Client.getConnection(Client.java:1243)
    at org.apache.hadoop.ipc.Client.call(Client.java:1087)
    ... 17 more

Wie Sie sehen können, es versucht zu zugreifen localhost/127.0.0.1:9000, die ist offensichtlich falsch.:

Aufruf von localhost/127.0.0.1:9000 fehlgeschlagen Verbindung Ausnahme

Dies ist, was meine /etc/hosts-Datei sieht wie folgt aus:

127.0.0.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
ff02::3 ip6-allhosts

Auch:
Ersetzen Sie localhost durch den public DNS von der Instanz funktioniert auch nicht

Hadoop-und HBase-Versionen?Und warum glaubst du, versucht, eine Verbindung zu localhost ist falsch?
hadoop: 1.1.2 und hbase 0.94.10, die sich auf das Diagramm auf Ihrer website sind kompatibel: hbase.apache.org/book/configuration.html#hadoop, und ich sage nicht, dass die Verbindung zu localhost falsch ist, aber localhost/127.0.0.1 wäre das nicht, wie die Verbindung zu www.stackoverflow/stackoverflow.com?
Aber Sie will das tun. Ich kann sehen, localhost in deiner config-Dateien. Wenn Sie nicht es verwenden möchten, dann brauchen Sie, um die ordnungsgemäße Verwendung von hostname in der config-Dateien.
[enter link description here][1] stackoverflow.com/questions/18065089/... [1]: stackoverflow.com/questions/18065089/...

InformationsquelleAutor Amre | 2013-08-05

Schreibe einen Kommentar