zoukankan      html  css  js  c++  java
  • 【原创】大叔经验分享(45)kibana添加index pattern卡住 返回403 Forbidden

    kibana添加index pattern卡住,通过浏览器查看请求返回状态为403 Forbidden,返回消息为:

    {"message":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];: [cluster_block_exception] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];","statusCode":403,"error":"Forbidden"}

    通过curl模拟请求响应如下:

    # curl -XPOST -H 'Content-Type: application/json' -H 'kbn-version: 6.6.0' http://kibana_server:5600/api/saved_objects/index-pattern -d '{"attributes": {"title": "index-prefix-*", "timeFieldName": "@timestamp"}}'
    {"message":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];: [cluster_block_exception] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];","statusCode":403,"error":"Forbidden"}

    解决方法:设置es索引参数

    # curl -XPUT -H 'Content-Type: application/json' http://es_server:9200/_settings -d '
    {
        "index": {
            "blocks": {
                "read_only_allow_delete": "false"
            }
        }
    }'
    # curl -XPUT -H 'Content-Type: application/json' http://es_server:9200/$index_name/_settings -d '
    {
        "index": {
            "blocks": {
                "read_only_allow_delete": "false"
            }
        }
    }'
  • 相关阅读:
    省市级联
    innerText与innerHTML的区别
    使用代码提交表单
    Date的使用
    Array(数组)的使用
    [贪心]Rest Stops
    [数论][Miller_Rabin] Goldbach
    [简单思维题]Hoofball
    [数论][容斥原理]Co-prime
    [图论][二分图最大匹配]Courses
  • 原文地址:https://www.cnblogs.com/barneywill/p/10622944.html
Copyright © 2011-2022 走看看