본문 바로가기
빅데이터/hbase

[HBase] java.lang.IllegalStateException: The procedure WAL relies on the ability to hsync for proper operation during component failures 오류 처리

by hs_seo 2022. 4. 20.

하둡 2.10.1 버전에 HBase 1.7.1 버전을 설치할 때 다음과 같은 오류가 발생하였습니다.

 

2022-04-20 10:37:11,640 FATAL [bigdata-hadoop-master-1:16000.activeMasterManager] 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:866)
	at org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.recoverLease(WALProcedureStore.java:326)
	at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.start(ProcedureExecutor.java:495)
	at org.apache.hadoop.hbase.master.HMaster.startProcedureExecutor(HMaster.java:1399)
	at org.apache.hadoop.hbase.master.HMaster.startServiceThreads(HMaster.java:1275)
	at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:816)
	at org.apache.hadoop.hbase.master.HMaster.access$600(HMaster.java:206)
	at org.apache.hadoop.hbase.master.HMaster$2.run(HMaster.java:2160)
	at java.lang.Thread.run(Thread.java:748)
2022-04-20 10:37:11,642 FATAL [bigdata-hadoop-master-1:16000.activeMasterManager] master.HMaster: Master server abort: loaded coprocessors are: []
2022-04-20 10:37:11,642 FATAL [bigdata-hadoop-master-1:16000.activeMasterManager] master.HMaster: Unhandled exception. Starting shutdown.
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:866)
	at org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.recoverLease(WALProcedureStore.java:326)
	at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.start(ProcedureExecutor.java:495)
	at org.apache.hadoop.hbase.master.HMaster.startProcedureExecutor(HMaster.java:1399)
	at org.apache.hadoop.hbase.master.HMaster.startServiceThreads(HMaster.java:1275)
	at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:816)
	at org.apache.hadoop.hbase.master.HMaster.access$600(HMaster.java:206)
	at org.apache.hadoop.hbase.master.HMaster$2.run(HMaster.java:2160)
	at java.lang.Thread.run(Thread.java:748)

 

원인은 HBase 1.7.1 버전이 하둡 2.8.5 버전의 라이브러리를 기본적으로 가지고 있기 때문입니다. 이를 해결하는 방법은 두가지가 있습니다.

 

설정 수정

hbase-site.xml 파일의 설정을 수정합니다.

    <property>
        <name>hbase.unsafe.stream.capability.enforce</name>
        <value>false</value>
    </property>

 

하둡 라이브러리 수정

hbase 가 기본적으로 2.8.5 버전의 라이브러리를 가지고 있기 때문에 ${HBASE_HOME}/lib 아래 있는 hadoop 관련 라이브러리를 제거하고, hadoop 에 있는 라이브러리를 복사해 줍니다.

rm /hbase/lib/hadoop-annotations-2.8.5.jar
ln -s /opt/hadoop/share/hadoop/common/lib/hadoop-annotations-2.10.1.jar /hbase/lib/hadoop-annotations-2.10.1.jar
반응형