메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


solr 데몬이 떠있는 동안 hadoop이 다운되고 hadoop을 재기동하여 서비스를 다시 시작하면 아래와 같은 오류가 발생할 수 있는데 이것은

hdfs://mycluster/user/root/solr/gc/core_node2/data/index/밑에 write.lock파일이 존재해서 발생하는 오류임.

이 파일을 지우고 solr데몬을 다시 기동하면 오류가 없이 정상적으로 서비스 가능하다.


확인 : hdfs dfs -ls hdfs://mycluster/user/root/solr/gc/core_node1/data/index

조치 : hdfs dfs -rm hdfs://mycluster/user/root/solr/gc/core_node1/data/index/write.lock


---------------오류내용---------------

 Caused by: org.apache.solr.common.SolrException: Index dir 'hdfs://mycluster/user/root/solr/gc/core_node2/data/index/' of core 'gc_shard1_replica2' is already locked. The most likely cause is
 another Solr server (or another solr core in this server) also configured to use this directory; other possible causes may be specific to lockType: hdfs
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:815)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:688)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:838)
        at org.apache.solr.core.CoreContainer.lambda$load$0(CoreContainer.java:494)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        ... 1 more
Caused by: org.apache.lucene.store.LockObtainFailedException: Index dir 'hdfs://mycluster/user/root/solr/gc/core_node2/data/index/' of core 'gc_shard1_replica2' is already locked. The most li
kely cause is another Solr server (or another solr core in this server) also configured to use this directory; other possible causes may be specific to lockType: hdfs
        at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:570)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:762)
        ... 8 more

번호 제목 날짜 조회 수
24 [Solr in Cloudera]Solr Data Directory변경 방법/절차 2023.04.21 147
23 collection생성혹은 collection조회시 Plugin init failure for [schema.xml] fieldType "pdate": Error loading class 'solr.IntField' 오류 조치사항 2022.04.07 284
22 elasticsearch에서 모든 인덱스(색인)을 삭제하는 방법 2019.06.09 281
21 shard3가 있는 서버에 문제가 있는 상태에서 solr query를 요청하는 경우 "no servers hosting shard: shard3" 오류가 발생하는 경우 조치사항 2018.01.04 265
» solr 데몬이 떠있는 동안 hadoop이 다운되는 경우 Index dir 'hdfs://mycluster/user/../core_node2/data/index/' of core 'gc_shard1_replica2' is already locked라논 오류가 발생하는데 이에 대한 조치사항 2018.01.04 373
19 Windows7 64bit 환경에서 ElasticSearch 5.6.3설치하기 2017.10.13 310
18 core 'gc_shard3_replica2' is already locked라는 오류가 발생할때 조치사항 2017.09.14 124
17 Core with name 'xx_shard4_replica1' already exists. 발생시 조치사항 2017.07.22 145
16 schema.xml vs managed-schema 지정 사용하기 - 두개를 동시에 사용할 수는 없음 2017.07.09 342
15 solr명령 실행시 "Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect" 오류발생 2017.06.30 380
14 solr 6.2에 한글 형태소 분석기(arirang 6.x) 적용 및 테스트 file 2017.06.27 1001
13 elasticsearch 기동시 permission denied on key 'vm.max_map_count' 오류발생시 조치사항 2017.06.23 499
12 solr 인스턴스 기동후 shard에 서버가 정상적으로 할당되지 않는 경우 해결책 2016.04.29 763
11 collection생성시 -shards와 -replicationFactor값을 잘못지정하면 write.lock for client xxx.xxx.xxx.xxx already exists오류가 발생한다. 2016.04.28 162
10 서버 5대에 solr 5.5.0 설치하고 index data를 HDFS에 저장/search하도록 설치/설정하는 방법(SolrCloud) 2016.04.08 738
9 서버 5대에 solr 5.5.0 설치하고 index data를 HDFS에 저장/search하도록 설치/설정하는 방법 2016.04.08 167
8 failed to read local state, exiting...오류발생시 조치사항 2016.04.06 214
7 elasticsearch 1.3.0에서 rdf및 hadoop plugin설치 2016.04.06 236
6 Elastic Search For Hadoop 2.2.0설치하기(5대 클러스터링) 2016.04.04 507
5 Using The ZooKeeper CLI에서 zkCli의 위치 2014.11.02 1030
위로