# Dangling index problem

**URL:** https://discuss.elastic.co/t/dangling-index-problem/8539
**Category:** Elasticsearch
**Created:** [July 27, 2012, 1:26pm UTC](https://discuss.elastic.co/t/dangling-index-problem/8539 "2012-07-27T13:26:26Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![ashu\_raikvar](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@ashu\_raikvar](https://discuss.elastic.co/u/ashu_raikvar)
#### Post date: [July 27, 2012, 1:26pm UTC](https://discuss.elastic.co/t/dangling-index-problem/8539/1 "2012-07-27T13:26:26Z")

</div>

hi all,  
please provide me some solution asap  
i have some indexes on local files at my server.after shutdown and restart  
it detected some other server as master which had no index in it.i realized  
the problem and after shutting down the scarp node i restarted my original  
node but all my indices become dangled and i cant find any way to get them  
back.  
please please give me a solution cuz those indices i were using in  
production.

Thanking you all in advance  
Ashutosh raikvar

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 27, 2012, 2:36pm UTC](https://discuss.elastic.co/t/dangling-index-problem/8539/2 "2012-07-27T14:36:47Z")

</div>

I'm afraid you can not get back your documents.  
As far as understand your problem:  
You have one node with x docs.  
You have node two running with 0 docs but with the same clustername.

You stop node1 and start it again.

So your node1 recognize your node2 which is a master node and told to node1 that  
there is 0 docs in the index.  
So, node1 delete all remaining index/docs.

One thing you can try is to stop node1. Then to stop node2.  
Then start node1 and see if you get back your docs.

Try to see the size of your node1 data dir to see if documents remains here.  
If your dir is almost empty, you won't recover your docs.

My 2 cents.  
David.

Le 27 juillet 2012 à 15:26, ashu raikvar [ashu.raikvar@gmail.com](mailto:ashu.raikvar@gmail.com) a écrit :

> hi all,  
> please provide me some solution asap  
> i have some indexes on local files at my server.after shutdown and restart it  
> detected some other server as master which had no index in it.i realized the  
> problem and after shutting down the scarp node i restarted my original node  
> but all my indices become dangled and i cant find any way to get them back.  
> please please give me a solution cuz those indices i were using in  
> production.
> 
> Thanking you all in advance  
> Ashutosh raikvar

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [July 27, 2012, 4:01pm UTC](https://discuss.elastic.co/t/dangling-index-problem/8539/3 "2012-07-27T16:01:47Z")

</div>

Which version elasticsearch were you running?

On Friday, July 27, 2012 10:36:47 AM UTC-4, David Pilato wrote:

> I'm afraid you can not get back your documents.
> 
> As far as understand your problem:
> 
> You have one node with x docs.
> 
> You have node two running with 0 docs but with the same clustername.
> 
> You stop node1 and start it again.
> 
> So your node1 recognize your node2 which is a master node and told to  
> node1 that there is 0 docs in the index.
> 
> So, node1 delete all remaining index/docs.
> 
> One thing you can try is to stop node1. Then to stop node2.
> 
> Then start node1 and see if you get back your docs.
> 
> Try to see the size of your node1 data dir to see if documents remains  
> here.
> 
> If your dir is almost empty, you won't recover your docs.
> 
> My 2 cents.
> 
> David.
> 
> Le 27 juillet 2012 à 15:26, ashu raikvar [ashu.raikvar@gmail.com](mailto:ashu.raikvar@gmail.com) a  
> écrit :
> 
> hi all,  
> please provide me some solution asap  
> i have some indexes on local files at my server.after shutdown and restart  
> it detected some other server as master which had no index in it.i realized  
> the problem and after shutting down the scarp node i restarted my original  
> node but all my indices become dangled and i cant find any way to get them  
> back.  
> please please give me a solution cuz those indices i were using in  
> production.
> 
> Thanking you all in advance  
> Ashutosh raikvar
> 
> --  
> David Pilato  
> [http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

---

<div class="post-metadata">

### Author: ![Abhishek\_Jajoria](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@Abhishek\_Jajoria](https://discuss.elastic.co/u/Abhishek_Jajoria)
#### Post date: [July 28, 2012, 5:17am UTC](https://discuss.elastic.co/t/dangling-index-problem/8539/4 "2012-07-28T05:17:19Z")

</div>

elasticsearch 0.19.7

On Fri, Jul 27, 2012 at 9:31 PM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:

> Which version elasticsearch were you running?
> 
> On Friday, July 27, 2012 10:36:47 AM UTC-4, David Pilato wrote:
> 
> > I'm afraid you can not get back your documents.
> > 
> > As far as understand your problem:
> > 
> > You have one node with x docs.
> > 
> > You have node two running with 0 docs but with the same clustername.
> > 
> > You stop node1 and start it again.
> > 
> > So your node1 recognize your node2 which is a master node and told to  
> > node1 that there is 0 docs in the index.
> > 
> > So, node1 delete all remaining index/docs.
> > 
> > One thing you can try is to stop node1. Then to stop node2.
> > 
> > Then start node1 and see if you get back your docs.
> > 
> > Try to see the size of your node1 data dir to see if documents remains  
> > here.
> > 
> > If your dir is almost empty, you won't recover your docs.
> > 
> > My 2 cents.
> > 
> > David.
> > 
> > Le 27 juillet 2012 à 15:26, ashu raikvar [ashu.raikvar@gmail.com](mailto:ashu.raikvar@gmail.com) a  
> > écrit :
> > 
> > hi all,  
> > please provide me some solution asap  
> > i have some indexes on local files at my server.after shutdown and  
> > restart it detected some other server as master which had no index in it.i  
> > realized the problem and after shutting down the scarp node i restarted my  
> > original node but all my indices become dangled and i cant find any way to  
> > get them back.  
> > please please give me a solution cuz those indices i were using in  
> > production.
> > 
> > Thanking you all in advance  
> > Ashutosh raikvar
> > 
> > --  
> > David Pilato  
> > [http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
> > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

---

<div class="post-metadata">

### Author: ![ashu\_raikvar](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@ashu\_raikvar](https://discuss.elastic.co/u/ashu_raikvar)
#### Post date: [July 28, 2012, 5:27am UTC](https://discuss.elastic.co/t/dangling-index-problem/8539/5 "2012-07-28T05:27:35Z")

</div>

I have all my indices file intact in my local file system [38gb size] but  
my production node does not recognize indices and throws dangling index  
problem.

On Friday, July 27, 2012 6:56:26 PM UTC+5:30, ashu raikvar wrote:

> hi all,  
> please provide me some solution asap  
> i have some indexes on local files at my server.after shutdown and restart  
> it detected some other server as master which had no index in it.i realized  
> the problem and after shutting down the scarp node i restarted my original  
> node but all my indices become dangled and i cant find any way to get them  
> back.  
> please please give me a solution cuz those indices i were using in  
> production.
> 
> Thanking you all in advance  
> Ashutosh raikvar

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 28, 2012, 9:09am UTC](https://discuss.elastic.co/t/dangling-index-problem/8539/6 "2012-07-28T09:09:42Z")

</div>

So, first, backup theses files.  
Then, is the dirname under data is the same as your cluster name ?  
What happens if you only start your local node?  
Can you see your index and documents?

--

Le 28 juil. 2012 à 07:27, ashu raikvar [ashu.raikvar@gmail.com](mailto:ashu.raikvar@gmail.com) a écrit :

> I have all my indices file intact in my local file system [38gb size] but my production node does not recognize indices and throws dangling index problem.
> 
> On Friday, July 27, 2012 6:56:26 PM UTC+5:30, ashu raikvar wrote:  
> hi all,  
> please provide me some solution asap  
> i have some indexes on local files at my server.after shutdown and restart it detected some other server as master which had no index in it.i realized the problem and after shutting down the scarp node i restarted my original node but all my indices become dangled and i cant find any way to get them back.  
> please please give me a solution cuz those indices i were using in production.
> 
> Thanking you all in advance  
> Ashutosh raikvar

---

<div class="post-metadata">

### Author: ![ashu\_raikvar](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@ashu\_raikvar](https://discuss.elastic.co/u/ashu_raikvar)
#### Post date: [July 28, 2012, 12:53pm UTC](https://discuss.elastic.co/t/dangling-index-problem/8539/7 "2012-07-28T12:53:11Z")

</div>

no i cant see my indices all of them become dangling as soon as i start  
production node.i did recovery from backup i made of whole cluster which  
saved me from disaster production node recognized the indices from the rar  
backup.but can some one explain me the fundamentals of \_state files in  
cluster and the shards?

On Friday, July 27, 2012 6:56:26 PM UTC+5:30, ashu raikvar wrote:

> hi all,  
> please provide me some solution asap  
> i have some indexes on local files at my server.after shutdown and restart  
> it detected some other server as master which had no index in it.i realized  
> the problem and after shutting down the scarp node i restarted my original  
> node but all my indices become dangled and i cant find any way to get them  
> back.  
> please please give me a solution cuz those indices i were using in  
> production.
> 
> Thanking you all in advance  
> Ashutosh raikvar

---

<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, 3:18am UTC](https://discuss.elastic.co/t/dangling-index-problem/8539/8 "2017-07-06T03:18:39Z")

</div>


