HBase单机模式配置以及不能创建表问题的解决方法(Caused by: java.net.ConnectException: Connection refused)



前些日子想试一试hbase,刚开始安装了单击版的,但是到最后创建表的时候出了错误,中间有一段时间做其他的事情了,今天有空就把以前的hbase拿出来回忆回忆,



我安装的单击版hbase是0.92.1的,下载完直接解压,hbase-env文件中加了

export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
export JAVA_HOME=/usr/local/java/jdk1.6.0_38/

 export HBASE_MANAGES_ZK=true



hbase-site中


<configuration>

<property>
<name>hbase.rootdir</name>
<value>file:///home/bigfish/myhbase1/</value>
</property>
 <property>
	        <name>hbase.zookeeper.property.dataDir</name>
	        <value>/home/bigfish/myhbase1/zookeeper</value>
	    </property>
</configuration>


然后启动hbase   Hmaseter启动了   启动  hbsae shell


list命令可以    status命令也可以  但是创建表的时候出错了


查看log文件下的日志:

2014-08-28 10:28:06,791 WARN org.apache.hadoop.hbase.master.AssignmentManager: Unable to find a viable location to assign region -ROOT-,,0.70236052


org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed setting up proxy interface org.apache.hadoop.hbase.ipc.HRegionInterface to localhost/127.0.0.1:43673 after attempts=1
    at org.apache.hadoop.hbase.ipc.HBaseRPC.waitForProxy(HBaseRPC.java:242)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1278)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1235)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1222)
    at org.apache.hadoop.hbase.master.ServerManager.getServerConnection(ServerManager.java:496)
    at org.apache.hadoop.hbase.master.ServerManager.sendRegionOpen(ServerManager.java:429)
    at org.apache.hadoop.hbase.master.AssignmentManager.assign(AssignmentManager.java:1592)
    at org.apache.hadoop.hbase.master.AssignmentManager.assign(AssignmentManager.java:1329)
    at org.apache.hadoop.hbase.master.AssignCallable.call(AssignCallable.java:44)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection refused


说的是ip地址不能正确映射,gedit /etc/hosts查看   发现    


localhost    127.0.0.1

bigfish     127.0.1.1


两者不一值,都改为 127.0.0.1    然后重启hbase   然后就能搞创建表了。



你可能感兴趣的:(hadoop,hbase)