# Corrupt Cluster State

**URL:** <https://discuss.elastic.co/t/corrupt-cluster-state/19520>\
**Category:** Elasticsearch\
**Created:** [August 28, 2014, 9:55pm UTC](https://discuss.elastic.co/t/corrupt-cluster-state/19520 "2014-08-28T21:55:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joshua\_Montgomery](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@Joshua\_Montgomery](https://discuss.elastic.co/u/Joshua_Montgomery)\
**Post date:** [August 28, 2014, 9:55pm UTC](https://discuss.elastic.co/t/corrupt-cluster-state/19520/1 "2014-08-28T21:55:03Z")

</div>

Is it possible to fix the state file if its been corrupted. Somehow a bad  
mapping was added and it had an extra '}' throwing the entire state file  
off. Deleting the bad mapping didn't fix the issue. Do I need to rebuild  
the entire cluster or is there a quick fix? Should Elasticsearch even allow  
bad mappings?

Also is it a good idea to run the cluster with this issue.

Thanks,  
-Josh

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6802bfc9-2b2e-4d44-9434-5c79e56462df%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6802bfc9-2b2e-4d44-9434-5c79e56462df%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [August 30, 2014, 6:23pm UTC](https://discuss.elastic.co/t/corrupt-cluster-state/19520/2 "2014-08-30T18:23:21Z")

</div>

Hi Josh,

Creating a broken mapping shouldn't be possible and sounds like a serious  
bug. Can you gist your broken mapping ? I would like to see if I can figure  
out how it happened (if you know it will be great). Also - what version of  
ES are you using?

I hope that seeing the mapping I can up with a work around. There are a  
couple of other options but choosing one depends on the amount data you  
have and wether you're OK with some down time.

Cheers,  
Boaz

On Thursday, August 28, 2014 11:55:04 PM UTC+2, Joshua Montgomery wrote:

> Is it possible to fix the state file if its been corrupted. Somehow a bad  
> mapping was added and it had an extra '}' throwing the entire state file  
> off. Deleting the bad mapping didn't fix the issue. Do I need to rebuild  
> the entire cluster or is there a quick fix? Should Elasticsearch even allow  
> bad mappings?
> 
> Also is it a good idea to run the cluster with this issue.
> 
> Thanks,  
> -Josh

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/40f587b5-35c8-428e-a68c-bebacc843637%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/40f587b5-35c8-428e-a68c-bebacc843637%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Joshua\_Montgomery](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@Joshua\_Montgomery](https://discuss.elastic.co/u/Joshua_Montgomery)\
**Post date:** [September 3, 2014, 6:32am UTC](https://discuss.elastic.co/t/corrupt-cluster-state/19520/3 "2014-09-03T06:32:34Z")

</div>

Thanks for the reply Boaz. Sorry for the late reply, was away for a while.  
We run ES ver 1.2.2 and use the zulu openJDK from azul.

So I'm going to get you the mappings in another post, but I think the  
cluster ended up becoming corrupt from an incident we saw about 1 1/2 weeks  
ago. I started another discussion about it  
here: [Redirecting to Google Groups](https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch/JwM0Gz9YO5M)

I'm thinking the continuous updating of mappings (which caused the internal  
DOS on the cluster) possibly had a sequence where it lead to a bad update  
of the state file.

The state file for that incident was pretty big (70MB+), I'm not sure if  
you want that. I can probably get a scoped down version of the mappings we  
had after the incident.

Thanks,  
-Josh

On Saturday, August 30, 2014 11:23:21 AM UTC-7, Boaz Leskes wrote:

> Hi Josh,
> 
> Creating a broken mapping shouldn't be possible and sounds like a serious  
> bug. Can you gist your broken mapping ? I would like to see if I can figure  
> out how it happened (if you know it will be great). Also - what version of  
> ES are you using?
> 
> I hope that seeing the mapping I can up with a work around. There are a  
> couple of other options but choosing one depends on the amount data you  
> have and wether you're OK with some down time.
> 
> Cheers,  
> Boaz
> 
> On Thursday, August 28, 2014 11:55:04 PM UTC+2, Joshua Montgomery wrote:
> 
> > Is it possible to fix the state file if its been corrupted. Somehow a bad  
> > mapping was added and it had an extra '}' throwing the entire state file  
> > off. Deleting the bad mapping didn't fix the issue. Do I need to rebuild  
> > the entire cluster or is there a quick fix? Should Elasticsearch even allow  
> > bad mappings?
> > 
> > Also is it a good idea to run the cluster with this issue.
> > 
> > Thanks,  
> > -Josh

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/03ee610a-bc90-405d-8153-736e7e793f7b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/03ee610a-bc90-405d-8153-736e7e793f7b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:04am UTC](https://discuss.elastic.co/t/corrupt-cluster-state/19520/4 "2017-07-06T01:04:43Z")

</div>


