Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES 不允许修改操作 #123

Open
lovelmh13 opened this issue Jul 23, 2021 · 0 comments
Open

ES 不允许修改操作 #123

lovelmh13 opened this issue Jul 23, 2021 · 0 comments

Comments

@lovelmh13
Copy link
Owner

若出现下图所示:

image

运行命令: curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'

或者在 kibana 的开发工具中运行:

PUT _settings
{
    "index": {
        "blocks": {
            "read_only_allow_delete": "false"
        }
    }
}

看到: {"acknowledged":true}% 就成功了

原因

这是由于ES新节点的数据目录 data 存储空间不足,导致从 master 主节点接收同步数据的时候失败,此时 ES 集群为了保护数据,会自动把索引分片 index 置为只读 read-only。

在我的硬盘还有 20G 和 7G 的时候都出现过该问题。但是只剩下 7G 空间的是时候,上述方法也不管用了,只好清理电脑腾出空间。

参考:

Elasticsearch error: cluster_block_exception [FORBIDDEN/12/index read-only / allow delete (api)], flood stage disk watermark exceeded

基于磁盘的分片分配

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant