# Curator action close fails if index.blocks.read\_only for .kibana meta index is set to true

**URL:** <https://discuss.elastic.co/t/curator-action-close-fails-if-index-blocks-read-only-for-kibana-meta-index-is-set-to-true/222482>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [March 6, 2020, 3:41pm UTC](https://discuss.elastic.co/t/curator-action-close-fails-if-index-blocks-read-only-for-kibana-meta-index-is-set-to-true/222482 "2020-03-06T15:41:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danksim](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danksim](https://discuss.elastic.co/u/danksim)\
**Post date:** [March 6, 2020, 3:41pm UTC](https://discuss.elastic.co/t/curator-action-close-fails-if-index-blocks-read-only-for-kibana-meta-index-is-set-to-true/222482/1 "2020-03-06T15:41:29Z")

</div>

I want to set the `visualize` and `dashboards` features `readonly` for my `Kibana` users. So I successfully ran the following from one of the elasticsearech data nodes (a k8s pod in this case):

```auto
>> curl -XPUT localhost:9200/.kibana/_settings -H 'Content-Type: application/json' -d '{ "index.blocks.read_only" : true }'
{"acknowledged":true}

```

But the Curator action `close` fails if `index.blocks.read_only` for `.kibana` meta index is set to `true` (it does not fail if set to `false`):

```auto
>> kubectl logs -n <my-namespace> elk-elasticsearch-curator-restore-1583507700-phf5c      
2020-03-06 15:20:08,797 INFO Preparing Action ID: 1, "close"
2020-03-06 15:20:08,804 INFO Trying Action ID: 1, "close": Close .kibana indices
2020-03-06 15:20:08,868 INFO Closing 1 selected indices: ['.kibana_1']
2020-03-06 15:20:08,875 ERROR Failed to complete action: close. <class 'curator.exceptions.FailedExecution'>: Exception encountered. Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: AuthorizationException(403, 'cluster_block_exception', 'blocked by: [FORBIDDEN/5/index read-only (api)];')

```

Is there a way to get around this without toggling `index.blocks.read_only` for `.kibana` meta index from `true` to `false` and then `false` back to `true`?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [March 6, 2020, 3:56pm UTC](https://discuss.elastic.co/t/curator-action-close-fails-if-index-blocks-read-only-for-kibana-meta-index-is-set-to-true/222482/2 "2020-03-06T15:56:45Z")

</div>

> [@danksim](#):
>
> Is there a way to get around this…?

Unfortunately not. You can clearly see that the exception returned (`cluster_block_exception`) is from Elasticsearch itself. Elasticsearch does not permit you to close an index that has `index.blocks.read_only: true`.

---

<div class="post-metadata">

**Author:** ![danksim](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danksim](https://discuss.elastic.co/u/danksim)\
**Post date:** [March 6, 2020, 4:19pm UTC](https://discuss.elastic.co/t/curator-action-close-fails-if-index-blocks-read-only-for-kibana-meta-index-is-set-to-true/222482/3 "2020-03-06T16:19:13Z")

</div>

Thanks @theuntergeek

Guess I'll have to somehow incorporate that toggle before and after the curator actions.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 3, 2020, 4:19pm UTC](https://discuss.elastic.co/t/curator-action-close-fails-if-index-blocks-read-only-for-kibana-meta-index-is-set-to-true/222482/4 "2020-04-03T16:19:20Z")

</div>

Closed on April 3, 2020, 4:19pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
