# How to revert metadata blocking?

**URL:** <https://discuss.elastic.co/t/how-to-revert-metadata-blocking/14129>\
**Category:** Elasticsearch\
**Created:** [October 27, 2013, 7:32pm UTC](https://discuss.elastic.co/t/how-to-revert-metadata-blocking/14129 "2013-10-27T19:32:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramazan](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@ramazan](https://discuss.elastic.co/u/ramazan)\
**Post date:** [October 27, 2013, 7:32pm UTC](https://discuss.elastic.co/t/how-to-revert-metadata-blocking/14129/1 "2013-10-27T19:32:59Z")

</div>

Hi,

I am facing an issue related to the metadata blocking setting.  
I told ES to disable the metadata changes for an index using update API but  
don't know how to revert it back.

I tried reverting it back using the fallowing command while the index in  
close state.

curl -XPUT '[http://127.0.0.1:9200/test1/\_settings](http://127.0.0.1:9200/test1/_settings)'  
{  
"index": {  
"blocks":{  
"metadata":false  
}  
}

}

Bu it returned:

{

- error: ClusterBlockException[blocked by: [FORBIDDEN/4/index  
closed];[FORBIDDEN/8/index write (api)];]
- status: 403

}

Here is the gist:

> <https://gist.github.com/rkarakaya/7186753>

I hope someone help me.

NOTE: I am using a few day old master branch of ES.

Thanks.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Boaz\_Leskes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boaz_leskes/32/723_2.png) [@Boaz\_Leskes](https://discuss.elastic.co/u/Boaz_Leskes)\
**Post date:** [October 28, 2013, 12:43pm UTC](https://discuss.elastic.co/t/how-to-revert-metadata-blocking/14129/2 "2013-10-28T12:43:34Z")

</div>

Hi,

I can't reproduce your error on master. My guess is that it is because the  
curl syntax misses a -d parameter on the end. This causes no body to be sent

curl -XPUT "[http://localhost:9200/test/\_settings](http://localhost:9200/test/_settings)" -d'  
{  
"index": {  
"blocks":{  
"metadata":false  
}  
}  
}'

I was wondering - why do you need to put a metadata block on a closed index?

On Sunday, October 27, 2013 8:32:59 PM UTC+1, [rkar...@gmail.com](mailto:rkar...@gmail.com) wrote:

> Hi,
> 
> I am facing an issue related to the metadata blocking setting.  
> I told ES to disable the metadata changes for an index using update API  
> but don't know how to revert it back.
> 
> I tried reverting it back using the fallowing command while the index in  
> close state.
> 
> curl -XPUT '[http://127.0.0.1:9200/test1/\_settings](http://127.0.0.1:9200/test1/_settings)'  
> {  
> "index": {  
> "blocks":{  
> "metadata":false  
> }  
> }
> 
> }
> 
> Bu it returned:
> 
> {
> 
> - error: ClusterBlockException[blocked by: [FORBIDDEN/4/index  
> closed];[FORBIDDEN/8/index write (api)];]
> - status: 403
> 
> }
> 
> Here is the gist:  
> [revert metadata blocking setting · GitHub](https://gist.github.com/rkarakaya/7186753)
> 
> I hope someone help me.
> 
> NOTE: I am using a few day old master branch of ES.
> 
> Thanks.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![ramazan](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@ramazan](https://discuss.elastic.co/u/ramazan)\
**Post date:** [October 31, 2013, 8:24pm UTC](https://discuss.elastic.co/t/how-to-revert-metadata-blocking/14129/3 "2013-10-31T20:24:12Z")

</div>

Hi,  
Hi,

I'll retry this with the latest master code.  
I wrote down curl commands just to explain the issue. I am not directly  
using curl.

> > > I was wondering - why do you need to put a metadata block on a closed  
> > > index?  
> > > I don't need actually 🙂  
> > > More than a year, I am working on an ES administration tool (Web based). I  
> > > encountered this issue while I am testing my gui.

On Monday, October 28, 2013 2:43:34 PM UTC+2, Boaz Leskes wrote:

> Hi,
> 
> I can't reproduce your error on master. My guess is that it is because the  
> curl syntax misses a -d parameter on the end. This causes no body to be sent
> 
> curl -XPUT "[http://localhost:9200/test/\_settings](http://localhost:9200/test/_settings)" -d'  
> {  
> "index": {  
> "blocks":{  
> "metadata":false  
> }  
> }  
> }'
> 
> I was wondering - why do you need to put a metadata block on a closed  
> index?
> 
> On Sunday, October 27, 2013 8:32:59 PM UTC+1, [rkar...@gmail.com](mailto:rkar...@gmail.com) wrote:
> 
> > Hi,
> > 
> > I am facing an issue related to the metadata blocking setting.  
> > I told ES to disable the metadata changes for an index using update API  
> > but don't know how to revert it back.
> > 
> > I tried reverting it back using the fallowing command while the index in  
> > close state.
> > 
> > curl -XPUT '[http://127.0.0.1:9200/test1/\_settings](http://127.0.0.1:9200/test1/_settings)'  
> > {  
> > "index": {  
> > "blocks":{  
> > "metadata":false  
> > }  
> > }
> > 
> > }
> > 
> > Bu it returned:
> > 
> > {
> > 
> > - error: ClusterBlockException[blocked by: [FORBIDDEN/4/index  
> > closed];[FORBIDDEN/8/index write (api)];]
> > - status: 403
> > 
> > }
> > 
> > Here is the gist:  
> > [revert metadata blocking setting · GitHub](https://gist.github.com/rkarakaya/7186753)
> > 
> > I hope someone help me.
> > 
> > NOTE: I am using a few day old master branch of ES.
> > 
> > Thanks.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Leonardo\_Menezes](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@Leonardo\_Menezes](https://discuss.elastic.co/u/Leonardo_Menezes)\
**Post date:** [October 31, 2013, 8:58pm UTC](https://discuss.elastic.co/t/how-to-revert-metadata-blocking/14129/4 "2013-10-31T20:58:06Z")

</div>

maybe this is related:

> <https://github.com/elastic/elasticsearch/issues/2833>
>
> In trying to protect completed daily indices from future changes, we tried setti…ng index.blocks.read\_only : true, but found that we were then unable to query \_status, and head plugin could no longer display shard information. I think this best illustrates the behavior we're seeing, but not expecting:
> 
> curl -XGET 'http://localhost:9200/messages\_20130301/\_status'
> {"error":"ClusterBlockException\[blocked by: \[FORBIDDEN/5/index read-only (api)\];\]","status":403}
> 
> Also, as an aside: what's the difference between index.blocks.read\_only : true and index.blocks.write : true (which lets me query status and prevents delete?)

Leonardo Menezes  
[http://lmenezes.com](http://lmenezes.com)

[http://twitter.com/leonardomenezes](http://twitter.com/leonardomenezes)

On Thu, Oct 31, 2013 at 9:24 PM, [rkarakaya@gmail.com](mailto:rkarakaya@gmail.com) wrote:

> Hi,  
> Hi,
> 
> I'll retry this with the latest master code.  
> I wrote down curl commands just to explain the issue. I am not directly  
> using curl.
> 
> > > > I was wondering - why do you need to put a metadata block on a closed  
> > > > index?  
> > > > I don't need actually 🙂  
> > > > More than a year, I am working on an ES administration tool (Web based). I  
> > > > encountered this issue while I am testing my gui.
> 
> On Monday, October 28, 2013 2:43:34 PM UTC+2, Boaz Leskes wrote:
> 
> > Hi,
> > 
> > I can't reproduce your error on master. My guess is that it is because  
> > the curl syntax misses a -d parameter on the end. This causes no body to be  
> > sent
> > 
> > curl -XPUT "[http://localhost:9200/test/\_\*\*settings](http://localhost:9200/test/_**settings)[http://localhost:9200/test/\_settings](http://localhost:9200/test/_settings)"  
> > -d'  
> > {  
> > "index": {  
> > "blocks":{  
> > "metadata":false  
> > }  
> > }  
> > }'
> > 
> > I was wondering - why do you need to put a metadata block on a closed  
> > index?
> > 
> > On Sunday, October 27, 2013 8:32:59 PM UTC+1, [rkar...@gmail.com](mailto:rkar...@gmail.com) wrote:
> > 
> > > Hi,
> > > 
> > > I am facing an issue related to the metadata blocking setting.  
> > > I told ES to disable the metadata changes for an index using update API  
> > > but don't know how to revert it back.
> > > 
> > > I tried reverting it back using the fallowing command while the index in  
> > > close state.
> > > 
> > > curl -XPUT '[http://127.0.0.1:9200/test1/\_\*\*settings](http://127.0.0.1:9200/test1/_**settings) [http://127.0.0.1:9200/test1/\_settings](http://127.0.0.1:9200/test1/_settings)'  
> > > {  
> > > "index": {  
> > > "blocks":{  
> > > "metadata":false  
> > > }  
> > > }
> > > 
> > > }
> > > 
> > > Bu it returned:
> > > 
> > > {
> > > 
> > > - error: ClusterBlockException[\*\*blocked by: [FORBIDDEN/4/index  
> > > closed];[FORBIDDEN/8/index write (api)];]
> > > - status: 403
> > > 
> > > }
> > > 
> > > Here is the gist:  
> > > [https://gist.github.com/\*\*rkarakaya/7186753](https://gist.github.com/**rkarakaya/7186753)[https://gist.github.com/rkarakaya/7186753](https://gist.github.com/rkarakaya/7186753)
> > > 
> > > I hope someone help me.
> > > 
> > > NOTE: I am using a few day old master branch of ES.
> > > 
> > > Thanks.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![ramazan](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@ramazan](https://discuss.elastic.co/u/ramazan)\
**Post date:** [October 31, 2013, 9:23pm UTC](https://discuss.elastic.co/t/how-to-revert-metadata-blocking/14129/5 "2013-10-31T21:23:04Z")

</div>

yes. it seems similar.

My workaround is :  
Don't allow user to change this setting 🙂

On Thursday, October 31, 2013 10:58:06 PM UTC+2, Leonardo Menezes wrote:

> maybe this is related:  
> [index.blocks.read\_only prevents \_status · Issue #2833 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/2833)
> 
> Leonardo Menezes  
> [http://lmenezes.com](http://lmenezes.com)
> 
> [http://twitter.com/leonardomenezes](http://twitter.com/leonardomenezes)
> 
> On Thu, Oct 31, 2013 at 9:24 PM, \<[rkar...@gmail.com](mailto:rkar...@gmail.com) \<javascript:\>\> wrote:
> 
> > Hi,  
> > Hi,
> > 
> > I'll retry this with the latest master code.  
> > I wrote down curl commands just to explain the issue. I am not directly  
> > using curl.
> > 
> > > > > I was wondering - why do you need to put a metadata block on a closed  
> > > > > index?  
> > > > > I don't need actually 🙂  
> > > > > More than a year, I am working on an ES administration tool (Web based).  
> > > > > I encountered this issue while I am testing my gui.
> > 
> > On Monday, October 28, 2013 2:43:34 PM UTC+2, Boaz Leskes wrote:
> > 
> > > Hi,
> > > 
> > > I can't reproduce your error on master. My guess is that it is because  
> > > the curl syntax misses a -d parameter on the end. This causes no body to be  
> > > sent
> > > 
> > > curl -XPUT "[http://localhost:9200/test/\_\*\*settings](http://localhost:9200/test/_**settings)[http://localhost:9200/test/\_settings](http://localhost:9200/test/_settings)"  
> > > -d'  
> > > {  
> > > "index": {  
> > > "blocks":{  
> > > "metadata":false  
> > > }  
> > > }  
> > > }'
> > > 
> > > I was wondering - why do you need to put a metadata block on a closed  
> > > index?
> > > 
> > > On Sunday, October 27, 2013 8:32:59 PM UTC+1, [rkar...@gmail.com](mailto:rkar...@gmail.com) wrote:
> > > 
> > > > Hi,
> > > > 
> > > > I am facing an issue related to the metadata blocking setting.  
> > > > I told ES to disable the metadata changes for an index using update API  
> > > > but don't know how to revert it back.
> > > > 
> > > > I tried reverting it back using the fallowing command while the index  
> > > > in close state.
> > > > 
> > > > curl -XPUT '[http://127.0.0.1:9200/test1/\_\*\*settings](http://127.0.0.1:9200/test1/_**settings) [http://127.0.0.1:9200/test1/\_settings](http://127.0.0.1:9200/test1/_settings)'
> > > > 
> > > > {  
> > > > "index": {  
> > > > "blocks":{  
> > > > "metadata":false  
> > > > }  
> > > > }
> > > > 
> > > > }
> > > > 
> > > > Bu it returned:
> > > > 
> > > > {
> > > > 
> > > > - error: ClusterBlockException[\*\*blocked by: [FORBIDDEN/4/index  
> > > > closed];[FORBIDDEN/8/index write (api)];]
> > > > - status: 403
> > > > 
> > > > }
> > > > 
> > > > Here is the gist:  
> > > > [https://gist.github.com/\*\*rkarakaya/7186753](https://gist.github.com/**rkarakaya/7186753)[https://gist.github.com/rkarakaya/7186753](https://gist.github.com/rkarakaya/7186753)
> > > > 
> > > > I hope someone help me.
> > > > 
> > > > NOTE: I am using a few day old master branch of ES.
> > > > 
> > > > Thanks.
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Leonardo\_Menezes](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@Leonardo\_Menezes](https://discuss.elastic.co/u/Leonardo_Menezes)\
**Post date:** [October 31, 2013, 9:46pm UTC](https://discuss.elastic.co/t/how-to-revert-metadata-blocking/14129/6 "2013-10-31T21:46:04Z")

</div>

that's what I did... even though I did't really appreciate this kind of "no  
turning back" operations. seems dangerous.

Leonardo Menezes  
[http://lmenezes.com](http://lmenezes.com)

[http://twitter.com/leonardomenezes](http://twitter.com/leonardomenezes)

On Thu, Oct 31, 2013 at 10:23 PM, [rkarakaya@gmail.com](mailto:rkarakaya@gmail.com) wrote:

> yes. it seems similar.
> 
> My workaround is :  
> Don't allow user to change this setting 🙂
> 
> On Thursday, October 31, 2013 10:58:06 PM UTC+2, Leonardo Menezes wrote:
> 
> > maybe this is related: [https://github.com/\*\*elasticsearch/elasticsearch/](https://github.com/**elasticsearch/elasticsearch/)\*  
> > \*issues/2833 [https://github.com/elasticsearch/elasticsearch/issues/2833](https://github.com/elasticsearch/elasticsearch/issues/2833)
> > 
> > Leonardo Menezes  
> > [http://lmenezes.com](http://lmenezes.com)
> > 
> > [http://twitter.com/leonardomenezes](http://twitter.com/leonardomenezes)
> > 
> > On Thu, Oct 31, 2013 at 9:24 PM, [rkar...@gmail.com](mailto:rkar...@gmail.com) wrote:
> > 
> > > Hi,  
> > > Hi,
> > > 
> > > I'll retry this with the latest master code.  
> > > I wrote down curl commands just to explain the issue. I am not directly  
> > > using curl.
> > > 
> > > > > > I was wondering - why do you need to put a metadata block on a closed  
> > > > > > index?  
> > > > > > I don't need actually 🙂  
> > > > > > More than a year, I am working on an ES administration tool (Web based).  
> > > > > > I encountered this issue while I am testing my gui.
> > > 
> > > On Monday, October 28, 2013 2:43:34 PM UTC+2, Boaz Leskes wrote:
> > > 
> > > > Hi,
> > > > 
> > > > I can't reproduce your error on master. My guess is that it is because  
> > > > the curl syntax misses a -d parameter on the end. This causes no body to be  
> > > > sent
> > > > 
> > > > curl -XPUT "[http://localhost:9200/test/\_\*\*s\*\*ettings](http://localhost:9200/test/_ **s** ettings)[http://localhost:9200/test/\_settings](http://localhost:9200/test/_settings)"  
> > > > -d'  
> > > > {  
> > > > "index": {  
> > > > "blocks":{  
> > > > "metadata":false  
> > > > }  
> > > > }  
> > > > }'
> > > > 
> > > > I was wondering - why do you need to put a metadata block on a closed  
> > > > index?
> > > > 
> > > > On Sunday, October 27, 2013 8:32:59 PM UTC+1, [rkar...@gmail.com](mailto:rkar...@gmail.com) wrote:
> > > > 
> > > > > Hi,
> > > > > 
> > > > > I am facing an issue related to the metadata blocking setting.  
> > > > > I told ES to disable the metadata changes for an index using update  
> > > > > API but don't know how to revert it back.
> > > > > 
> > > > > I tried reverting it back using the fallowing command while the index  
> > > > > in close state.
> > > > > 
> > > > > curl -XPUT '[http://127.0.0.1:9200/test1/\_\*\*\*\*settings](http://127.0.0.1:9200/test1/_ **** settings) [http://127.0.0.1:9200/test1/\_settings](http://127.0.0.1:9200/test1/_settings)'
> > > > > 
> > > > > {  
> > > > > "index": {  
> > > > > "blocks":{  
> > > > > "metadata":false  
> > > > > }  
> > > > > }
> > > > > 
> > > > > }
> > > > > 
> > > > > Bu it returned:
> > > > > 
> > > > > {
> > > > > 
> > > > > - error: ClusterBlockException[ **b** locked by: [FORBIDDEN/4/index  
> > > > > closed];[FORBIDDEN/8/index write (api)];]
> > > > > - status: 403
> > > > > 
> > > > > }
> > > > > 
> > > > > Here is the gist:  
> > > > > [https://gist.github.com/\*\*rkarak\*\*aya/7186753](https://gist.github.com/ **rkarak** aya/7186753)[https://gist.github.com/rkarakaya/7186753](https://gist.github.com/rkarakaya/7186753)
> > > > > 
> > > > > I hope someone help me.
> > > > > 
> > > > > NOTE: I am using a few day old master branch of ES.
> > > > > 
> > > > > Thanks.
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > .
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 2:09am UTC](https://discuss.elastic.co/t/how-to-revert-metadata-blocking/14129/7 "2017-07-06T02:09:31Z")

</div>


