ehs*_*adi 18 elasticsearch elasticsearch-5
当我尝试在elasticsearch中存储任何内容时,错误说:
TransportError(403, u'cluster_block_exception', u'blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];')
Run Code Online (Sandbox Code Playgroud)
我已经在索引中插入了大约2亿个文档.但我不知道为什么会发生这种错误.我试过了:
curl -u elastic:changeme -XPUT 'localhost:9200/_cluster/settings' -H 'Content-Type: application/json' -d '{"persistent":{"cluster.blocks.read_only":false}}'
Run Code Online (Sandbox Code Playgroud)
如上所述: ElasticSearch进入"只读"模式,节点无法更改
结果是:
{"acknowledged":true,"persistent":{"cluster":{"blocks":{"read_only":"false"}}},"transient":{}}
Run Code Online (Sandbox Code Playgroud)
但没有改变.我该怎么办?
tru*_*liu 38
试试GET yourindex/_settings
,这将显示你的索引设置.如果read_only_allow_delete
是true
,那么尝试:
PUT /<yourindex>/_settings
{
"index.blocks.read_only_allow_delete": null
}
Run Code Online (Sandbox Code Playgroud)
我解决了我的问题.
请参阅es配置指南以获取更多详细信息.
小智 17
上个月,我遇到了同样的问题,您可以在Kibana开发工具上尝试使用此代码
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
Run Code Online (Sandbox Code Playgroud)
希望对您有所帮助
当我的磁盘空间已满时,我遇到了同样的问题,
请看我做的步骤
1-增加磁盘空间
2-更新索引只读模式,请参阅以下curl请求
curl -XPUT -H“内容类型:application / json” http:// localhost:9200 / _all / _settings -d'{“ index.blocks.read_only_allow_delete”:null}'
归档时间: |
|
查看次数: |
9104 次 |
最近记录: |