Elasticsearch - cluster_block_exception [FORBIDDEN/12/index read-only / allow delete (api)]

简介: Elasticsearch - cluster_block_exception [FORBIDDEN/12/index read-only / allow delete (api)]

20190806092132811.jpg

Error

{
    "error": "{\"type\":\"cluster_block_exception\",\"reason\":\"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];\"}",
    "errorReason": "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];",
    "errorType": "cluster_block_exception",
    "id": "lpH2aXkBdAyiAR22_Nsh",
    "index": "artisan",
    "operation": "index",
    "status": 403,
    "type": "artisan"
}


修复

在kibana中执行

PUT artisan/_settings
{
  "index.blocks.read_only_allow_delete": null
}


执行完以后 无需重启

或者主机上直接执行如下command

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


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


扩展


6.4版本的 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/6.4/disk-allocator.html


20210514171548287.png

20210514171658211.png

20210514171749598.png

20210514171831118.png

curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
{
  "transient": {
    "cluster.routing.allocation.disk.watermark.low": "100gb",
    "cluster.routing.allocation.disk.watermark.high": "50gb",
    "cluster.routing.allocation.disk.watermark.flood_stage": "10gb",
    "cluster.info.update.interval": "1m"
  }
}
'


相关实践学习
以电商场景为例搭建AI语义搜索应用
本实验旨在通过阿里云Elasticsearch结合阿里云搜索开发工作台AI模型服务,构建一个高效、精准的语义搜索系统,模拟电商场景,深入理解AI搜索技术原理并掌握其实现过程。
ElasticSearch 最新快速入门教程
本课程由千锋教育提供。全文搜索的需求非常大。而开源的解决办法Elasricsearch(Elastic)就是一个非常好的工具。目前是全文搜索引擎的首选。本系列教程由浅入深讲解了在CentOS7系统下如何搭建ElasticSearch,如何使用Kibana实现各种方式的搜索并详细分析了搜索的原理,最后讲解了在Java应用中如何集成ElasticSearch并实现搜索。  
相关文章
|
5月前
|
缓存 监控 前端开发
顺企网 API 开发实战:搜索 / 详情接口从 0 到 1 落地(附 Elasticsearch 优化 + 错误速查)
企业API开发常陷参数、缓存、错误处理三大坑?本指南拆解顺企网双接口全流程,涵盖搜索优化、签名验证、限流应对,附可复用代码与错误速查表,助你2小时高效搞定开发,提升响应速度与稳定性。
|
存储 API 数据库
检索服务elasticsearch索引(Index)
【8月更文挑战第23天】
766 6
|
存储 人工智能 自然语言处理
Elasticsearch Inference API增加对阿里云AI的支持
本文将介绍如何在 Elasticsearch 中设置和使用阿里云的文本生成、重排序、稀疏向量和稠密向量服务,提升搜索相关性。
599 14
Elasticsearch Inference API增加对阿里云AI的支持
|
存储 人工智能 API
(Elasticsearch)使用阿里云 infererence API 及 semantic text 进行向量搜索
本文展示了如何使用阿里云 infererence API 及 semantic text 进行向量搜索。
607 8
|
数据可视化 API 索引
ES常见Index API操作最佳实践!
【10月更文挑战第21天】
786 1
ES常见Index API操作最佳实践!
|
监控 API 索引
Elasticsearch集群使用 _cluster/health API
Elasticsearch集群使用 _cluster/health API
589 2
|
Unix API 索引
Elasticsearch集群使用 _cat/health API
Elasticsearch集群使用 _cat/health API
315 1
|
存储 JSON API
【Azure 存储服务】使用REST API操作Azure Storage Table,删除数据(Delete Entity)
【Azure 存储服务】使用REST API操作Azure Storage Table,删除数据(Delete Entity)
179 0
【Azure 存储服务】使用REST API操作Azure Storage Table,删除数据(Delete Entity)
|
存储
Elasticsearch exception [type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index r【已解决】
Elasticsearch exception [type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index r【已解决】
505 1
|
存储 缓存 Java
掌握Elasticsearch集群参数查询API
掌握Elasticsearch集群参数查询API