我正在尝试恢复已关闭的索引,但到目前为止,任何尝试都没有成功。
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
在其输出中。
启动日志中也没有提及任何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 甚至不会尝试恢复/打开它。