index read-only

系统重启后,Eleastisearch6.5.0在给 Eleastisearch 更新索引的时候报了一个错误:
ClusterBlockException[blocked by: [FORBIDDEN/hxl_test/index read-only / allow delete (api)];]

按照 Eleastisearch 官方文档给的解决办法是
An example of resetting the read-only index block on the twitter index:

PUT /twitter/_settings
{
"index.blocks.read_only_allow_delete": null
}

 

出现该问题的一个原因是磁盘空间不足导致了,如下参数默认是95%,若磁盘空间利用超过95%,就会将索引设置为了只读状态,禁止写入了.

cluster.routing.allocation.disk.watermark.flood_stage

 

解决办法:
1.查看当前设置
curl -XGET http://192.168.1.136:19200/_all/_settings?pretty
找到index.blocks.read_only_allow_delete项
发现该项的值为true

2.修改该项的值
curl -XPUT -H "Content-Type: application/json" http://192.168.1.136:19200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'

posted @ 2019-02-16 10:09  slnngk  阅读(508)  评论(0编辑  收藏  举报