HBase环境搭建60010端口无法访问问题解决方案

一、环境配置说明
首先需要搭建Hadoop 环境
(本人Hadoop环境相关信息如下:
version : 1.1.2
模式:伪分布模式
)
HBase的版本:0.94.2
JDK版本:1.6
Linux版本:Centos 6.4
二、问题原因及解决方案
在搭建HBase环境时,相应的进程都启动,shell也能够进去。
但是通过浏览器访问60010端口查看HBase相关信息时,一直无法连接。

原因:
查看hbase文件夹下(本人是/usr/local/hbase)的logs文件夹 查看相应的日志文件(第一次启动hbase最好清空下这个文件夹下的内容,保证日志文件是最新的)
查看相应的日志文件(hbase-root-master-hadoop.log)发现:
….
2015-07-16 07:40:45,872 INFO org.apache.hadoop.hbase.master.SplitLogManager: found 0 orphan tasks and 0 rescan nodes
2015-07-16 07:40:45,875 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:40:55,882 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:41:05,890 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:41:15,896 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:41:25,907 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:41:35,922 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:41:45,927 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:41:55,932 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:42:05,938 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:42:15,948 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:42:25,956 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:42:35,960 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:42:45,964 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:42:55,970 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:43:05,975 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:43:15,981 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:43:25,990 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:43:36,001 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:43:46,010 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:43:56,021 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode…
2015-07-16 07:44:05,878 ERROR org.apache.hadoop.hbase.master.HMasterCommandLine: Failed to start master
java.lang.RuntimeException: Master not initialized after 200 seconds

这个错误 是hadoop的safemode(安全模式)引起的
解决方案:
执行下述命令
hadoop dfsadmin -safemode leave
(注意将hadoop目录的bin子目录加入到PATH 可修改/etc/profile文件)
重启hbase(start-hbase.sh)

再次访问60010端口 成功!
三、思考
配置环境时 出现问题不可怕 要学会从log中分析出错原因
并慢慢分析可能的原因 再寻找解决方案
这样从中才能学到更多。

你可能感兴趣的:(HBase环境搭建60010端口无法访问问题解决方案)