问题描述:执行命令start-hbase.sh启动hbase,jps没有查看到HMaster进程,通过查看log文件发现如下错误:
2013-10-31 23:47:50,652 ERROR org.apache.hadoop.hbase.master.HMasterCommandLine: Failed to start master
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMasterCommandLine$LocalHMasterCannot assign requested address
at org.apache.hadoop.hbase.util.JVMClusterUtil.createMasterThread(JVMClusterUtil.java:134)
at org.apache.hadoop.hbase.LocalHBaseCluster.addMaster(LocalHBaseCluster.java:197)
at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:147)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:146)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:104)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2118)
Caused by: java.net.BindException: Problem binding to bogon/192.168.2.101:0 : Cannot assign requested address
at org.apache.hadoop.hbase.ipc.HBaseServer.bind(HBaseServer.java:258)
at org.apache.hadoop.hbase.ipc.HBaseServer$Listener.<init>(HBaseServer.java:482)
at org.apache.hadoop.hbase.ipc.HBaseServer.<init>(HBaseServer.java:1559)
问题解决:
本人hbase-site.xml配置如下:
1、进入hbase安装目录下lib目录,删除对应hadoop-core-1.0.4.jar的jar包(本人安装hadoop版本为1.2.1),删除完成后拷贝hadoop安装目录下
hadoop-core-1.2.1.jar的jar文件到该目录。
2、修改/etc/hosts文件,更改hostname对应的IP地址为当前正确的IP128.128.86.111
3、重新启动hbase