gpt4 book ai didi

elasticsearch - TransportError(403, u'cluster_block_exception', u'blocked by : [FORBIDDEN/12/index read-only/allow delete (api)];')

转载 作者:行者123 更新时间:2023-11-29 02:43:53 26 4
gpt4 key购买 nike

当我尝试在 elasticsearch 中存储任何内容时,出现错误提示:

TransportError(403, u'cluster_block_exception', u'blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];')

我已经在我的索引中插入了大约 2 亿个文档。但我不知道为什么会发生此错误。我试过:

curl -u elastic:changeme -XPUT 'localhost:9200/_cluster/settings' -H 'Content-Type: application/json' -d '{"persistent":{"cluster.blocks.read_only":false}}'

正如这里提到的: ElasticSearch entered "read only" mode, node cannot be altered

结果是:

{"acknowledged":true,"persistent":{"cluster":{"blocks":{"read_only":"false"}}},"transient":{}}

但是什么都没有改变。我该怎么办?

最佳答案

尝试GET yourindex/_settings,这将显示您的索引设置。如果 read_only_allow_deletetrue,则尝试:

PUT /<yourindex>/_settings
{
"index.blocks.read_only_allow_delete": null
}

我的问题已解决。

请引用es config guide了解更多详情。

curl 命令是

curl -X PUT "localhost:9200/twitter/_settings?pretty" -H 'Content-Type: application/json' -d '
{
"index.blocks.read_only_allow_delete": null
}'

关于elasticsearch - TransportError(403, u'cluster_block_exception', u'blocked by : [FORBIDDEN/12/index read-only/allow delete (api)];'),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48032661/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com