hbase 2.0.2

hbase standalone方式启动报错:

2019-01-17 15:49:08,730 ERROR [Thread-24] master.HMaster: Failed to become active master

java.lang.IllegalStateException: The procedure WAL relies on the ability to hsync for proper operation during component failures, but the underlying filesystem does not support doing so. Please check the config value of 'hbase.procedure.store.wal.use.hsync' to set the desired level of robustness and ensure the config value of 'hbase.wal.dir' points to a FileSystem mount that can provide it.

at org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.rollWriter(WALProcedureStore.java:1082)

at org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.recoverLease(WALProcedureStore.java:423)

at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.init(ProcedureExecutor.java:714)

at org.apache.hadoop.hbase.master.HMaster.createProcedureExecutor(HMaster.java:1398)

at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:857)

at org.apache.hadoop.hbase.master.HMaster.startActiveMasterManager(HMaster.java:2225)

at org.apache.hadoop.hbase.master.HMaster.lambda$run$0(HMaster.java:568)

at java.lang.Thread.run(Thread.java:748)

报错原因异常message里描述的比较清楚,standalone方式直接使用本地磁盘,而本地磁盘不支持hsync,查看配置:

<property>

<name>hbase.procedure.store.wal.use.hsync</name>

<value>true</value>

</property>

改为false再启动,依然报错,跟进代码:

org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore

  private final boolean enforceStreamCapability;

  public WALProcedureStore(final Configuration conf, final Path walDir, final Path walArchiveDir,
final LeaseRecovery leaseRecovery) throws IOException {
...
this.enforceStreamCapability = conf.getBoolean(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE, true);
... boolean rollWriter(final long logId) throws IOException {
...
final String durability = useHsync ? "hsync" : "hflush";
if (enforceStreamCapability && !(CommonFSUtils.hasCapability(newStream, durability))) {
throw new IllegalStateException("The procedure WAL relies on the ability to " + durability +
" for proper operation during component failures, but the underlying filesystem does " +
"not support doing so. Please check the config value of '" + USE_HSYNC_CONF_KEY +
"' to set the desired level of robustness and ensure the config value of '" +
CommonFSUtils.HBASE_WAL_DIR + "' points to a FileSystem mount that can provide it.");
}
...

可见hbase.procedure.store.wal.use.hsync如果为true,则使用hsync;如果为false,则使用hflush;
两种都会报错,这时注意到还有一个变量控制enforceStreamCapability,这个变量对应的配置为hbase.unsafe.stream.capability.enforce,将该配置设置为false,问题解决;

什么情况下需要standalone hbase,通常是初学者练习使用,不过也有一些产品在用,比如ambari的metrics collector;

关于Standalone HBase

This is the default mode. In standalone mode, HBase does not use HDFS -- it uses the local filesystem instead -- and it runs all HBase daemons and a local ZooKeeper all up in the same JVM. Zookeeper binds to a well known port so clients may talk to HBase.

standalone方式详见官方文档:
http://hbase.apache.org/0.94/book/quickstart.html

【原创】大叔问题定位分享(24)hbase standalone方式启动报错的更多相关文章

  1. 【原创】大叔问题定位分享(29)datanode启动报错:50020端口被占用

    集群中有一台datanode一直启动报错如下: java.net.BindException: Problem binding to [$server1:50020] java.net.BindExc ...

  2. 【原创】大叔问题定位分享(5)Kafka客户端报错SocketException: Too many open files 打开的文件过多

    kafka0.8.1 一 问题 10月22号应用系统忽然报错: [2014/12/22 11:52:32.738]java.net.SocketException: 打开的文件过多 [2014/12/ ...

  3. 【原创】大叔问题定位分享(31)hive metastore报错

    hive metastore在建表时报错 [pool-5-thread-2]: MetaException(message:Got exception: java.net.ConnectExcepti ...

  4. 【原创】大叔问题定位分享(16)spark写数据到hive外部表报错ClassCastException: org.apache.hadoop.hive.hbase.HiveHBaseTableOutputFormat cannot be cast to org.apache.hadoop.hive.ql.io.HiveOutputFormat

    spark 2.1.1 spark在写数据到hive外部表(底层数据在hbase中)时会报错 Caused by: java.lang.ClassCastException: org.apache.h ...

  5. Hbase master启动报错:Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster Caused by: java.net.UnknownHostException:

    Hbase master启动报错: java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop ...

  6. hbase shell 启动报错

    启动hbase之后,发现hbase shell启动报错: version 2.0.0-alpha4, r5c4b985f89c99cc8b0f8515a4097c811a0848835, Tue Oc ...

  7. 【原创】大叔问题定位分享(25)ambari metrics collector内置standalone hbase启动失败

    ambari metrics collector内置hbase目录位于 /usr/lib/ams-hbase 配置位于 /etc/ams-hbase/conf 通过ruby启动 /usr/lib/am ...

  8. 【原创】大叔问题定位分享(13)HBase Region频繁下线

    问题现象:hive执行sql报错 select count(*) from test_hive_table; 报错 Error: java.io.IOException: org.apache.had ...

  9. 【原创】大叔问题定位分享(8)提交spark任务报错 Caused by: java.lang.ClassNotFoundException: org.I0Itec.zkclient.exception.ZkNoNodeException

    spark 2.1.1 一 问题重现 spark-submit --master local[*] --class app.package.AppClass --jars /jarpath/zkcli ...

随机推荐

  1. 获取任意链接文章正文 API 功能简介

    此文章对开放数据接口 API 之「获取任意链接文章正文」进行了功能介绍.使用场景介绍以及调用方法的说明,供用户在使用数据接口时参考之用. 1. 产品功能 接口开放了根据提供的文章链接 Url 参数,智 ...

  2. wince单实例启动

    static class Program { [DllImport("Toolhelp.dll")] public static extern IntPtr CreateToolh ...

  3. 基本环境安装: Centos7+Java+Hadoop+Spark+HBase+ES+Azkaban

    1.  安装VM14的方法在 人工智能标签中的<跨平台踩的大坑有提到> 2. CentOS分区设置: /boot:1024M,标准分区格式创建. swap:4096M,标准分区格式创建. ...

  4. vue 点击当前元素添加class 去掉兄弟的class 获取当前点击元素的文字

    点击当前标签给其添加class,兄弟标签class删除 然后获取当前点击元素的文字 演示地址: https://xibushijie.github.io/static/addClass.html &l ...

  5. LCD学习

    LCD简介(1)显示器,常见显示器(2)LCD(Liquid Crystal Display),液晶显示器,原理介绍(3)LCD应用领域(4)LED OLED1.17.1.2.电子显示器的原理(1)像 ...

  6. 启动jar的方式

    1.windows server 2008 start "srvRegistry" java -jar srvRegistry-1.0-SNAPSHOT.jar --spring. ...

  7. WinForm登录验证

    概述:输错三次禁止登陆,15分钟后才能继续. 图示: Form1代码: using System; using System.Configuration; using System.Data.SqlC ...

  8. BSGS+exBSGS POJ2417+POJ3243

    a^x=b(mod p)求x,利用分块的思想根号p的复杂度求答案,枚举同余式两端的变量,用hash的方法去找最小的答案(PS:hash看上去很像链式前向星就很有好感).然后如果p不是质数时,就利用同余 ...

  9. create table as 和create table like的区别

    create table as 和create table like的区别 对于MySQL的复制相同表结构方法,有create table as 和create table like 两种,区别是什么 ...

  10. Java9 接口细谈

    java9对接口进行了改进,允许在接口中定义默认方法和类方法并且都支持方法的实现.同时添加了一种私有方法,私有方法也可提供方法实现. 注:下面语法只有在Java8以上的版本才允许在接口定义默认方法.类 ...