生产elasticsearch排障 open index fail

我们elasticsearch 进行了批量写入的优化。

 

1.当前面临的问题是 elasticsearch open index 成功,查询失败。

 

尝试 close/open

 

curl xx.xxx.xxx.xxx:9200/test_index/_close

```

{

"acknowledge":"true"

}

```

curl xx.xxx.xxx.xxx:9200/test_index/_open


```

{

"acknowledge":"true"

}

```

 

问题依旧

2. 尝试 _cluster/reroute

首先通过 

curl xx.xx.xxx.xxx:9200/_cat/shards

 

 

看到是test_index 的所有primary shard UNASSIGNED

因此尝试使用

curl xx.xx.xxx.xxx:9200/_cluster/reroute

{

"allocate":{

"index":"test_index",

"shard":0,

"node":"yyyyyyyyyyyyyy"

}

}

报错, primary shard not assigned

 

经过百度搜索,查看了es的文档,有以下接口进行分析

 

curl xx.xx.xx.xx:9200/_cluster/allocation/explain

 

发现某个文件错误是 "ACCESS DENIED EXCEPTION"

 

原来是shard 的文件没有权限

 

posted @ 2020-11-06 14:55  风云力  阅读(193)  评论(0编辑  收藏  举报