Hbase master无法构建

时间:2014-06-17 19:14:21

标签: hadoop hbase

我正在一对Linux服务器上尝试双节点hbase集群。所有文件都被转移,服务器上有一个正在运行的hadoop集群,但是hbase仍然拒绝完全工作。 zookeepers和region服务器正常启动,我甚至可以使用shell但是master拒绝启动。主服务器的日志原因如下:

2014-06-17 14:56:43,678 ERROR [main] master.HMasterCommandLine: Master exiting
java.lang.RuntimeException: Failed construction of Master: class org.apache.hado
op.hbase.master.HMaster
        at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2
785)
        at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMaster
CommandLine.java:184)
        at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandL
ine.java:134)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLi
ne.java:126)
        at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2799)
Caused by: java.net.UnknownHostException: hadoop-namenode
        at org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUti
l.java:418)
        at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxi
es.java:231)
        at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.ja
va:139)
        at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:510)
        at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:453)
        at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFi
leSystem.java:136)
        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2433
)
        at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88)
        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:246
7)
        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2449)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:367)
        at org.apache.hadoop.fs.Path.getFileSystem(Path.java:287)
        at org.apache.hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:883)
        at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:459)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2
780)
        ... 5 more

我的hbase-site.xml的配置是

<configuration>
<property>
<name>hbase.master</name>
<value>master:60000</value>
</property>

<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoop-namenode:9000/hbase</value>
</property>


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



<property>
     <name>hbase.zookeeper.property.clientPort</name>
   <value>2222</value>
 </property>


<property>
<name>hbase.zookeeper.quorum</name>
<value>master</value>
</property>
</configuration>

我的配置有问题,还是网络问题?

1 个答案:

答案 0 :(得分:2)

HBase master无法解析“hadoop-namenode”的ip。您是否已在主计算机的/etc/hosts文件中添加了“hadoop-namenode”。您可以通过HBase主计算机中的ping hadoop-namenode轻松检查它。