HBase使用本地 hostname 才获得IP地址. 正反向的DNS都是可以的.
如果你的机器有多个接口,HBase会使用hostname指向的主接口.
如果还不够,你可以设置 hbase.regionserver.dns.interface 来指定主接口。当然你的整个集群的配置文件都必须一致,每个主机都使用相同的网络接口
还有一种方法是设置 hbase.regionserver.dns.nameserver来指定nameserver,不使用系统带的.
127.0.0.1 localhost 127.0.0.1 ubuntu.ubuntu-domain ubuntu
集群的时钟要保证基本的一致。稍有不一致是可以容忍的,但是很大的不一致会造成奇怪的行为。 运行 NTP 或者其他什么东西来同步你的时间.
如果查询的时候或者是遇到奇怪的故障,可以检查一下系统时间是否正确。使用命令date。
如果你使用的是Ubuntu,你可以这样设置:
在文件 /etc/security/limits.conf 添加一行,如:
hadoop - nofile 32768
<?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>hbase.rootdir</name> <value>hdfs://master:9000/hbase</value> </property> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>master</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> </configuration> ~ ~ "hbase-site.xml" [readonly] 41L, 1345C
http://master:60010/master-status
2013-09-09 10:28:02,878 WARN org.apache.hadoop.hbase.util.FSUtils: Unable to create version file at hdfs://master:9000/hbase, retrying: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="hbase":hadoop:supergroup:rwxr-xr-x 2013-09-09 10:28:02,881 FATAL org.apache.hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown. org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="hbase":hadoop:supergroup:rwxr-xr-x
$hadoop dfsadmin -safemode get
$hadoop dfsadmin -safemode leaveB、很简单,将hbase/lib目录下的hadoop-core的jar文件删除,将hadoop目录下的hadoop-x.y.z-core.jar拷贝到hbase/lib下面,然后重新启动hbase即可。
$sudo chmod a+rwx /usr/local/hadoop/hbase/hbase-0.94.11-security/bin/../logs/SecurityAuth.audit
A、启动hadoop后,需要等一段时间,再开启hbase
B、去掉hadoop的安全模式:
hadoop dfsadmin -safemode leave