我想在mac os上使用elasticsearch 6,但是当我通过将文档添加到none创建索引时,在第二个索引更改为只读之后,如果添加文档或更新文档,则会出现此错误。
"error" : {
"root_cause" : [
{
"type" : "cluster_block_exception",
"reason" : "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
}
],
"type" : "cluster_block_exception",
"reason" : "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
},
"status" : 403
}我测试禁用只读
curl -H'Content-Type: application/json' -XPUT localhost:9200/test/_settings?pretty -d'
{
"index": {
"blocks.read_only": false
}
}'
{
"acknowledged" : true
}但是没有什么改变
我用ubuntu在另一个系统上测试弹性6,没关系,没有错误,所以我认为我的系统可能出了问题,但是elasticsearch 5.6.2工作正常,没有任何错误
弹性原木
[2018-01-05T21:56:52,254][WARN ][o.e.c.r.a.DiskThresholdMonitor] [gCjouly] flood stage disk watermark [95%] exceeded on [gCjoulysTFy1DDU7f7dOWQ][gCjouly][/Users/peter/Downloads/elasticsearch-6.1.1/data/nodes/0] free: 15.7gb[3.3%], all indices on this node will marked read-only发布于 2018-01-07 09:51:32
我有这个问题,我认为在弹性6中添加新的设置关闭索引时,空硬小于5%,您可以在elasticsearch.yml的下面一行中禁用此设置。
cluster.routing.allocation.disk.threshold_enabled: false然后重新启动elasticsearch。我希望这对你有用
发布于 2018-09-19 04:29:58
方便复制/粘贴到Kibana控制台
# disable threshold alert
PUT /_cluster/settings
{
"persistent" : {
"cluster.routing.allocation.disk.threshold_enabled" : false
}
}
# unlock indices from read-only state
PUT /_all/_settings
{
"index.blocks.read_only_allow_delete": null
}发布于 2019-01-09 14:59:04
如果你在码头进行弹性搜索,那么码头可能已经没有空间了。运行docker volume prune以删除未使用的本地卷或在Docker首选项中增加磁盘映像大小。
https://stackoverflow.com/questions/48119189
复制相似问题