首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >elasticsearch 6索引更改为仅在几秒钟后读取

问elasticsearch 6索引更改为仅在几秒钟后读取
EN

Stack Overflow用户
提问于 2018-01-05 18:20:05
回答 5查看 17.1K关注 0票数 18

我想在mac os上使用elasticsearch 6,但是当我通过将文档添加到none创建索引时,在第二个索引更改为只读之后,如果添加文档或更新文档,则会出现此错误。

代码语言:javascript
复制
"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
}

我测试禁用只读

代码语言:javascript
复制
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工作正常,没有任何错误

弹性原木

代码语言:javascript
复制
[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
EN

回答 5

Stack Overflow用户

发布于 2018-01-07 09:51:32

我有这个问题,我认为在弹性6中添加新的设置关闭索引时,空硬小于5%,您可以在elasticsearch.yml的下面一行中禁用此设置。

代码语言:javascript
复制
 cluster.routing.allocation.disk.threshold_enabled: false

然后重新启动elasticsearch。我希望这对你有用

票数 39
EN

Stack Overflow用户

发布于 2018-09-19 04:29:58

方便复制/粘贴到Kibana控制台

代码语言:javascript
复制
# 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
}
票数 18
EN

Stack Overflow用户

发布于 2019-01-09 14:59:04

如果你在码头进行弹性搜索,那么码头可能已经没有空间了。运行docker volume prune以删除未使用的本地卷或在Docker首选项中增加磁盘映像大小。

票数 13
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48119189

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档