我正在尝试恢复已关闭的索引,但任何尝试这样做都是不成功的。
GET /_cat/indices/
显示:
green open .fess_config.web_config m7yOnyvERje6baMyvi5IHA 2 0 1 0 10kb 10kb
close .suggest_analyzer fjKXYnKHSQOeVsqf_ETTVA
green open .fess_user.group jyu086_5QUKmx9N64EHsRQ 5 0 0 0 1.2kb 1.2kb
GET /_cluster/health?level=indices&pretty
根本不包含fjKXYnKHSQOeVsqf_ETTVA
。
启动日志中还有没有提及<{strong> 1 fjKXYnKHSQOeVsqf_ETTVA
。
GET /.suggest_analyzer/fjKXYnKHSQOeVsqf_ETTVA/_recovery?human
和
GET /.suggest_analyzer/fjKXYnKHSQOeVsqf_ETTVA/_open
导致:
{
"error": {
"root_cause": [{
"type": "index_closed_exception",
"reason": "closed",
"index_uuid": "fjKXYnKHSQOeVsqf_ETTVA",
"index": ".suggest_analyzer"
}
],
"type": "index_closed_exception",
"reason": "closed",
"index_uuid": "fjKXYnKHSQOeVsqf_ETTVA",
"index": ".suggest_analyzer"
},
"status": 400
}
GET /_recovery?human
返回一切正常,但在回复中再次没有提到fjKXYnKHSQOeVsqf_ETTVA
。
文件系统上也没有*recovery
个文件:
[root@mmm indices]# ls -lR fjKXYnKHSQOeVsqf_ETTVA
fjKXYnKHSQOeVsqf_ETTVA:
drwxr-xr-x 5 elasticsearch elasticsearch 4096 Mar 19 11:33 0
drwxr-xr-x 5 elasticsearch elasticsearch 4096 Mar 19 11:33 1
drwxr-xr-x 5 elasticsearch elasticsearch 4096 Mar 19 11:33 2
drwxr-xr-x 5 elasticsearch elasticsearch 4096 Mar 19 11:33 3
drwxr-xr-x 5 elasticsearch elasticsearch 4096 Mar 19 11:33 4
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 _state
fjKXYnKHSQOeVsqf_ETTVA/0:
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 index
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 _state
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 translog
fjKXYnKHSQOeVsqf_ETTVA/0/index:
-rw-r--r-- 1 elasticsearch elasticsearch 230 Mar 16 11:03 segments_1
-rw-r--r-- 1 elasticsearch elasticsearch 0 Mar 16 11:03 write.lock
fjKXYnKHSQOeVsqf_ETTVA/0/_state:
-rw-r--r-- 1 elasticsearch elasticsearch 125 Mar 16 11:03 state-0.st
fjKXYnKHSQOeVsqf_ETTVA/0/translog:
-rw-r--r-- 1 elasticsearch elasticsearch 43 Mar 16 11:03 translog-1.tlog
-rw-r--r-- 1 elasticsearch elasticsearch 80 Mar 16 11:03 translog.ckp
fjKXYnKHSQOeVsqf_ETTVA/1:
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 index
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 _state
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 translog
fjKXYnKHSQOeVsqf_ETTVA/1/index:
-rw-r--r-- 1 elasticsearch elasticsearch 230 Mar 16 11:03 segments_1
-rw-r--r-- 1 elasticsearch elasticsearch 0 Mar 16 11:03 write.lock
fjKXYnKHSQOeVsqf_ETTVA/1/_state:
-rw-r--r-- 1 elasticsearch elasticsearch 125 Mar 16 11:03 state-0.st
fjKXYnKHSQOeVsqf_ETTVA/1/translog:
-rw-r--r-- 1 elasticsearch elasticsearch 43 Mar 16 11:03 translog-1.tlog
-rw-r--r-- 1 elasticsearch elasticsearch 80 Mar 16 11:03 translog.ckp
fjKXYnKHSQOeVsqf_ETTVA/2:
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 index
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 _state
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 translog
fjKXYnKHSQOeVsqf_ETTVA/2/index:
-rw-r--r-- 1 elasticsearch elasticsearch 230 Mar 16 11:03 segments_1
-rw-r--r-- 1 elasticsearch elasticsearch 0 Mar 16 11:03 write.lock
fjKXYnKHSQOeVsqf_ETTVA/2/_state:
-rw-r--r-- 1 elasticsearch elasticsearch 125 Mar 16 11:03 state-0.st
fjKXYnKHSQOeVsqf_ETTVA/2/translog:
-rw-r--r-- 1 elasticsearch elasticsearch 43 Mar 16 11:03 translog-1.tlog
-rw-r--r-- 1 elasticsearch elasticsearch 80 Mar 16 11:03 translog.ckp
fjKXYnKHSQOeVsqf_ETTVA/3:
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 index
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 _state
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 translog
fjKXYnKHSQOeVsqf_ETTVA/3/index:
-rw-r--r-- 1 elasticsearch elasticsearch 230 Mar 16 11:03 segments_1
-rw-r--r-- 1 elasticsearch elasticsearch 0 Mar 16 11:03 write.lock
fjKXYnKHSQOeVsqf_ETTVA/3/_state:
-rw-r--r-- 1 elasticsearch elasticsearch 125 Mar 16 11:03 state-0.st
fjKXYnKHSQOeVsqf_ETTVA/3/translog:
-rw-r--r-- 1 elasticsearch elasticsearch 43 Mar 16 11:03 translog-1.tlog
-rw-r--r-- 1 elasticsearch elasticsearch 80 Mar 16 11:03 translog.ckp
fjKXYnKHSQOeVsqf_ETTVA/4:
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 index
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 _state
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 19 11:33 translog
fjKXYnKHSQOeVsqf_ETTVA/4/index:
-rw-r--r-- 1 elasticsearch elasticsearch 230 Mar 16 11:03 segments_1
-rw-r--r-- 1 elasticsearch elasticsearch 0 Mar 16 11:03 write.lock
fjKXYnKHSQOeVsqf_ETTVA/4/_state:
-rw-r--r-- 1 elasticsearch elasticsearch 125 Mar 16 11:03 state-0.st
fjKXYnKHSQOeVsqf_ETTVA/4/translog:
-rw-r--r-- 1 elasticsearch elasticsearch 43 Mar 16 11:03 translog-1.tlog
-rw-r--r-- 1 elasticsearch elasticsearch 80 Mar 16 11:03 translog.ckp
fjKXYnKHSQOeVsqf_ETTVA/_state:
-rw-r--r-- 1 elasticsearch elasticsearch 71958 Mar 19 11:33 state-7.st
[root@mmm indices]#
那么如何强制ES打开这个索引呢?
1 由于文件丢失,索引的恢复失败了两次,但该问题已经解决,现在ES甚至不会尝试恢复/打开它。
答案 0 :(得分:0)
解决:
POST /_all/_open
使用空的JSON正文{}
{
"acknowledged": true,
"shards_acknowledged": true
}
GET /_cat/indices/
green open .fess_config.web_config m7yOnyvERje6baMyvi5IHA 2 0 1 0 10kb 10kb
green open .suggest_analyzer fjKXYnKHSQOeVsqf_ETTVA 5 0 0 0 1.2kb 1.2kb
green open .fess_user.group jyu086_5QUKmx9N64EHsRQ 5 0 0 0 1.2kb 1.2kb