# Loosing all my docs when restarting my single node 0.18.7

**URL:** <https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658>\
**Category:** Elasticsearch\
**Created:** [February 9, 2012, 3:57pm UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658 "2012-02-09T15:57:41Z")\
**Posts on this page:** 10\
**Page:** 1

<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:** [February 9, 2012, 3:57pm UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658/1 "2012-02-09T15:57:41Z")

</div>

Hi there,

Here is my case.

1. I start a fresh node 0.18.7 under windows with multicast=false and  
cluster.name set to BANACO\_DEV\_DPILATO

2. I define some index, alias and mappings.

3. I index in Java 373 documents.

4. I search for it using a TransportClient. I get back 373 documents.

I look at the data dir : 68 folders, 243 files, 907 Kb used

1. I stop the ES node  
I look at the data dir : 68 folders, 102 files, 552 Kb used

2. I start again the ES node

I search again for documents : 0 document exists Look at the data dir : 68  
folders, 123 files, 3.39 Kb used

Using Mobz, I can see that my indexes, alias and mappings still exists.

But documents are not here anymore !

To kill the node, I use CTRL+C (or close command) in my Windows command  
box.

It was working fine in 0.17.10. I didn't test in 0.18. previous version.

What can I do to find the issue ? Any trace to activate ?

Here are the logs :  
First start of the node  
[2012-02-09 16:23:29,482][WARN][bootstrap] jvm uses the client vm, make  
sure to run `java` with the server vm for best performance by adding  
`-server` to the command line  
[2012-02-09 16:23:29,497][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
initializing ...  
[2012-02-09 16:23:29,513][INFO][plugins] [Spirit of '76] loaded  
[mapper-attachments], sites []  
[2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
initialized  
[2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
starting ...  
[2012-02-09 16:23:31,888][INFO][transport] [Spirit of '76] bound\_address  
{inet[/0.0.0.0:9300]}, publish\_address {inet[/10.115.1.55:9300]}  
[2012-02-09 16:23:34,981][INFO][cluster.service] [Spirit of '76]  
new\_master [Spirit of  
'76][cmTmj1OfRa-O-pIrL4ddjg][inet[/10.115.1.55:9300]], reason:  
zen-disco-join (elected\_as\_master)  
[2012-02-09 16:23:35,044][INFO][discovery] [Spirit of '76]  
BANACO\_DEV\_DPILATO/cmTmj1OfRa-O-pIrL4ddjg  
[2012-02-09 16:23:35,153][INFO][http] [Spirit of '76] bound\_address  
{inet[/0.0.0.0:9200]}, publish\_address {inet[/10.115.1.55:9200]}  
[2012-02-09 16:23:35,169][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
started  
[2012-02-09 16:23:35,622][INFO][gateway] [Spirit of '76] recovered [4]  
indices into cluster\_state

First stop of the node  
[2012-02-09 16:27:57,439][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
stopping ...  
[2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
stopped  
[2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
closing ...  
[2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
closed

Second start of the node  
[2012-02-09 16:29:04,260][WARN][bootstrap] jvm uses the client vm, make  
sure to run `java` with the server vm for best performance by adding  
`-server` to the command line  
[2012-02-09 16:29:04,276][INFO][node] [Hairbag] {0.18.7}[17148]:  
initializing ...  
[2012-02-09 16:29:04,291][INFO][plugins] [Hairbag] loaded  
[mapper-attachments], sites []  
[2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]:  
initialized  
[2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: starting  
...  
[2012-02-09 16:29:06,603][INFO][transport] [Hairbag] bound\_address  
{inet[/0.0.0.0:9300]}, publish\_address {inet[/10.115.1.55:9300]}  
[2012-02-09 16:29:09,681][INFO][cluster.service] [Hairbag] new\_master  
[Hairbag][43JnSF1SRiW3yPINWcFZFg][inet[/10.115.1.55:9300]], reason:  
zen-disco-join (elected\_as\_master)  
[2012-02-09 16:29:09,712][INFO][discovery] [Hairbag]  
BANACO\_DEV\_DPILATO/43JnSF1SRiW3yPINWcFZFg  
[2012-02-09 16:29:09,806][INFO][http] [Hairbag] bound\_address  
{inet[/0.0.0.0:9200]}, publish\_address {inet[/10.115.1.55:9200]}  
[2012-02-09 16:29:09,806][INFO][node] [Hairbag] {0.18.7}[17148]: started  
[2012-02-09 16:29:10,291][INFO][gateway] [Hairbag] recovered [4] indices  
into cluster\_state

Thanks for your advice

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

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [February 9, 2012, 4:35pm UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658/2 "2012-02-09T16:35:27Z")

</div>

Hi,  
How many shards and replicas your indices have? It is not clear from your  
log and is important in this scenario.  
Lukáš

Dne 9.2.2012 16:57 "[david@pilato.fr](mailto:david@pilato.fr)" [david@pilato.fr](mailto:david@pilato.fr) napsal(a):

> \*\*
> 
> Hi there,
> 
> Here is my case.
> 
> 1. I start a fresh node 0.18.7 under windows with multicast=false and  
> cluster.name set to BANACO\_DEV\_DPILATO
> 
> 2. I define some index, alias and mappings.
> 
> 3. I index in Java 373 documents.
> 
> 4. I search for it using a TransportClient. I get back 373 documents.
> 
> I look at the data dir : 68 folders, 243 files, 907 Kb used
> 
> 1. I stop the ES node  
> I look at the data dir : 68 folders, 102 files, 552 Kb used
> 
> 2. I start again the ES node
> 
> I search again for documents : 0 document exists Look at the data dir : 68  
> folders, 123 files, 3.39 Kb used
> 
> Using Mobz, I can see that my indexes, alias and mappings still exists.
> 
> But documents are not here anymore !
> 
> To kill the node, I use CTRL+C (or close command) in my Windows command  
> box.
> 
> It was working fine in 0.17.10. I didn't test in 0.18. previous version.
> 
> What can I do to find the issue ? Any trace to activate ?
> 
> Here are the logs :  
> First start of the node  
> [2012-02-09 16:23:29,482][WARN][bootstrap] jvm uses the client vm, make  
> sure to run `java` with the server vm for best performance by adding  
> `-server` to the command line  
> [2012-02-09 16:23:29,497][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> initializing ...  
> [2012-02-09 16:23:29,513][INFO][plugins] [Spirit of '76] loaded  
> [mapper-attachments], sites   
> [2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> initialized  
> [2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> starting ...  
> [2012-02-09 16:23:31,888][INFO][transport] [Spirit of '76] bound\_address  
> {inet[/0.0.0.0:9300]}, publish\_address {inet[/10.115.1.55:9300]}  
> [2012-02-09 16:23:34,981][INFO][cluster.service] [Spirit of '76]  
> new\_master [Spirit of '76][cmTmj1OfRa-O-pIrL4ddjg][inet[/10.115.1.55:9300]],  
> reason: zen-disco-join (elected\_as\_master)  
> [2012-02-09 16:23:35,044][INFO][discovery] [Spirit of '76]  
> BANACO\_DEV\_DPILATO/cmTmj1OfRa-O-pIrL4ddjg  
> [2012-02-09 16:23:35,153][INFO][http] [Spirit of '76] bound\_address  
> {inet[/0.0.0.0:9200]}, publish\_address {inet[/10.115.1.55:9200]}  
> [2012-02-09 16:23:35,169][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> started  
> [2012-02-09 16:23:35,622][INFO][gateway] [Spirit of '76] recovered [4]  
> indices into cluster\_state
> 
> First stop of the node  
> [2012-02-09 16:27:57,439][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> stopping ...  
> [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> stopped  
> [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> closing ...  
> [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> closed
> 
> Second start of the node  
> [2012-02-09 16:29:04,260][WARN][bootstrap] jvm uses the client vm, make  
> sure to run `java` with the server vm for best performance by adding  
> `-server` to the command line  
> [2012-02-09 16:29:04,276][INFO][node] [Hairbag] {0.18.7}[17148]:  
> initializing ...  
> [2012-02-09 16:29:04,291][INFO][plugins] [Hairbag] loaded  
> [mapper-attachments], sites   
> [2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]:  
> initialized  
> [2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]:  
> starting ...  
> [2012-02-09 16:29:06,603][INFO][transport] [Hairbag] bound\_address  
> {inet[/0.0.0.0:9300]}, publish\_address {inet[/10.115.1.55:9300]}  
> [2012-02-09 16:29:09,681][INFO][cluster.service] [Hairbag] new\_master  
> [Hairbag][43JnSF1SRiW3yPINWcFZFg][inet[/10.115.1.55:9300]], reason:  
> zen-disco-join (elected\_as\_master)  
> [2012-02-09 16:29:09,712][INFO][discovery] [Hairbag]  
> BANACO\_DEV\_DPILATO/43JnSF1SRiW3yPINWcFZFg  
> [2012-02-09 16:29:09,806][INFO][http] [Hairbag] bound\_address  
> {inet[/0.0.0.0:9200]}, publish\_address {inet[/10.115.1.55:9200]}  
> [2012-02-09 16:29:09,806][INFO][node] [Hairbag] {0.18.7}[17148]: started  
> [2012-02-09 16:29:10,291][INFO][gateway] [Hairbag] recovered [4] indices  
> into cluster\_state
> 
> Thanks for your advice
> 
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet

---

<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:** [February 9, 2012, 5:37pm UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658/3 "2012-02-09T17:37:01Z")

</div>

Thanks Lukas for your interest.

I made more tests. First of all, I use very standard setup 5 shards 1  
replica.

I moved my data dir to data.old and restart everything.  
Everything is working fine. My docs doesn't disappear anymore.

I moved this new data dir to data.ok and move data.old to data and restart  
the test.  
My docs disappears again.

So there was probably something wrong in my data...  
Do you want me to send a copy of this _incorrect_ data dir ?

David.

Le 9 février 2012 à 17:35, "Lukáš Vlček" [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) a écrit :

> Hi,  
> How many shards and replicas your indices have? It is not clear from your  
> log and is important in this scenario.  
> Lukáš
> 
> Dne 9.2.2012 16:57 " [david@pilato.fr](mailto:david@pilato.fr) [mailto:david@pilato.fr](mailto:david@pilato.fr) " \<  
> [david@pilato.fr](mailto:david@pilato.fr) [mailto:david@pilato.fr](mailto:david@pilato.fr) \> napsal(a):
> 
> > Hi there,
> > 
> > Here is my case.
> > 
> > 1. I start a fresh node 0.18.7 under windows with multicast=false and  
> > cluster.name [http://cluster.name](http://cluster.name) set to BANACO\_DEV\_DPILATO
> > 
> > 2. I define some index, alias and mappings.
> > 
> > 3. I index in Java 373 documents.
> > 
> > 4. I search for it using a TransportClient. I get back 373 documents.
> > 
> > I look at the data dir : 68 folders, 243 files, 907 Kb used
> > 
> > 1. I stop the ES node I look at the data dir : 68 folders, 102 files, 552  
> > Kb used
> > 
> > 2. I start again the ES node
> > 
> > I search again for documents : 0 document exists Look at the data dir : 68  
> > folders, 123 files, 3.39 Kb used
> > 
> > Using Mobz, I can see that my indexes, alias and mappings still exists.
> > 
> > But documents are not here anymore !
> > 
> > To kill the node, I use CTRL+C (or close command) in my Windows command  
> > box.
> > 
> > It was working fine in 0.17.10. I didn't test in 0.18. previous version.
> > 
> > What can I do to find the issue ? Any trace to activate ?
> > 
> > Here are the logs :  
> > First start of the node  
> > [2012-02-09 16:23:29,482][WARN][bootstrap] jvm uses the client vm, make  
> > sure to run `java` with the server vm for best performance by adding  
> > `-server` to the command line  
> > [2012-02-09 16:23:29,497][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> > initializing ...  
> > [2012-02-09 16:23:29,513][INFO][plugins] [Spirit of '76] loaded  
> > [mapper-attachments], sites   
> > [2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> > initialized  
> > [2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> > starting ...  
> > [2012-02-09 16:23:31,888][INFO][transport] [Spirit of '76] bound\_address  
> > {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300  
> > [http://10.115.1.55:9300](http://10.115.1.55:9300) ]}  
> > [2012-02-09 16:23:34,981][INFO][cluster.service] [Spirit of '76]  
> > new\_master [Spirit of  
> > '76][cmTmj1OfRa-O-pIrL4ddjg][inet[/10.115.1.55:9300]], reason:  
> > zen-disco-join (elected\_as\_master)  
> > [2012-02-09 16:23:35,044][INFO][discovery] [Spirit of '76]  
> > BANACO\_DEV\_DPILATO/cmTmj1OfRa-O-pIrL4ddjg  
> > [2012-02-09 16:23:35,153][INFO][http] [Spirit of '76] bound\_address  
> > {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200  
> > [http://10.115.1.55:9200](http://10.115.1.55:9200) ]}  
> > [2012-02-09 16:23:35,169][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> > started  
> > [2012-02-09 16:23:35,622][INFO][gateway] [Spirit of '76] recovered [4]  
> > indices into cluster\_state
> > 
> > First stop of the node  
> > [2012-02-09 16:27:57,439][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> > stopping ...  
> > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> > stopped  
> > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> > closing ...  
> > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]:  
> > closed
> > 
> > Second start of the node  
> > [2012-02-09 16:29:04,260][WARN][bootstrap] jvm uses the client vm, make  
> > sure to run `java` with the server vm for best performance by adding  
> > `-server` to the command line  
> > [2012-02-09 16:29:04,276][INFO][node] [Hairbag] {0.18.7}[17148]:  
> > initializing ...  
> > [2012-02-09 16:29:04,291][INFO][plugins] [Hairbag] loaded  
> > [mapper-attachments], sites   
> > [2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]:  
> > initialized  
> > [2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: starting  
> > ...  
> > [2012-02-09 16:29:06,603][INFO][transport] [Hairbag] bound\_address  
> > {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300  
> > [http://10.115.1.55:9300](http://10.115.1.55:9300) ]}  
> > [2012-02-09 16:29:09,681][INFO][cluster.service] [Hairbag] new\_master  
> > [Hairbag][43JnSF1SRiW3yPINWcFZFg][inet[/10.115.1.55:9300]], reason:  
> > zen-disco-join (elected\_as\_master)  
> > [2012-02-09 16:29:09,712][INFO][discovery] [Hairbag]  
> > BANACO\_DEV\_DPILATO/43JnSF1SRiW3yPINWcFZFg  
> > [2012-02-09 16:29:09,806][INFO][http] [Hairbag] bound\_address  
> > {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200  
> > [http://10.115.1.55:9200](http://10.115.1.55:9200) ]}  
> > [2012-02-09 16:29:09,806][INFO][node] [Hairbag] {0.18.7}[17148]: started  
> > [2012-02-09 16:29:10,291][INFO][gateway] [Hairbag] recovered [4] indices  
> > into cluster\_state
> > 
> > Thanks for your advice
> > 
> > --  
> > David Pilato  
> > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/) [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > Twitter : @dadoonet

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

---

<div class="post-metadata">

**Author:** ![Matt1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matt1/32/2986_2.png) [@Matt1](https://discuss.elastic.co/u/Matt1)\
**Post date:** [February 10, 2012, 6:10am UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658/4 "2012-02-10T06:10:57Z")

</div>

Completely random, and only because I ran into this myself earlier:

Is TTL on? Check you mappings?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 12, 2012, 1:17pm UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658/5 "2012-02-12T13:17:18Z")

</div>

I got lost a bit with the description. You mean that when you stop the node, the data (and its sub directories are there), and when you start it again, your search returns nothing, but they are still there, and es-head shows content?

On Thursday, February 9, 2012 at 7:37 PM, [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Thanks Lukas for your interest.
> 
> I made more tests. First of all, I use very standard setup 5 shards 1 replica.
> 
> I moved my data dir to data.old and restart everything.
> 
> Everything is working fine. My docs doesn't disappear anymore.
> 
> I moved this new data dir to data.ok and move data.old to data and restart the test.
> 
> My docs disappears again.
> 
> So there was probably something wrong in my data...
> 
> Do you want me to send a copy of this _incorrect_ data dir ?
> 
> David.
> 
> Le 9 février 2012 à 17:35, "Lukáš Vlček" \<[lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) ([mailto:lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com))\> a écrit :
> 
> > Hi,  
> > How many shards and replicas your indices have? It is not clear from your log and is important in this scenario.  
> > Lukáš  
> > Dne 9.2.2012 16:57 " [david@pilato.fr](mailto:david@pilato.fr) ([mailto:david@pilato.fr](mailto:david@pilato.fr)) " \< [david@pilato.fr](mailto:david@pilato.fr) ([mailto:david@pilato.fr](mailto:david@pilato.fr)) \> napsal(a):
> > 
> > > Hi there,
> > > 
> > > Here is my case.
> > > 
> > > 1. I start a fresh node 0.18.7 under windows with multicast=false and cluster.name ([http://cluster.name](http://cluster.name)) set to BANACO\_DEV\_DPILATO
> > > 
> > > 2. I define some index, alias and mappings.
> > > 
> > > 3. I index in Java 373 documents.
> > > 
> > > 4. I search for it using a TransportClient. I get back 373 documents.  
> > > I look at the data dir : 68 folders, 243 files, 907 Kb used
> > > 
> > > 5. I stop the ES node I look at the data dir : 68 folders, 102 files, 552 Kb used
> > > 
> > > 6. I start again the ES node  
> > > I search again for documents : 0 document exists Look at the data dir : 68 folders, 123 files, 3.39 Kb used
> > > 
> > > Using Mobz, I can see that my indexes, alias and mappings still exists.  
> > > But documents are not here anymore !
> > > 
> > > To kill the node, I use CTRL+C (or close command) in my Windows command box.
> > > 
> > > It was working fine in 0.17.10. I didn't test in 0.18. previous version.
> > > 
> > > What can I do to find the issue ? Any trace to activate ?
> > > 
> > > Here are the logs :  
> > > First start of the node  
> > > [2012-02-09 16:23:29,482][WARN][bootstrap] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line  
> > > [2012-02-09 16:23:29,497][INFO][node] [Spirit of '76] {0.18.7}[20144]: initializing ...  
> > > [2012-02-09 16:23:29,513][INFO][plugins] [Spirit of '76] loaded [mapper-attachments], sites   
> > > [2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]: initialized  
> > > [2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]: starting ...  
> > > [2012-02-09 16:23:31,888][INFO][transport] [Spirit of '76] bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300 ([http://10.115.1.55:9300](http://10.115.1.55:9300)) ]}  
> > > [2012-02-09 16:23:34,981][INFO][cluster.service] [Spirit of '76] new\_master [Spirit of '76][cmTmj1OfRa-O-pIrL4ddjg][inet[/10.115.1.55:9300]], reason: zen-disco-join (elected\_as\_master)  
> > > [2012-02-09 16:23:35,044][INFO][discovery] [Spirit of '76] BANACO\_DEV\_DPILATO/cmTmj1OfRa-O-pIrL4ddjg  
> > > [2012-02-09 16:23:35,153][INFO][http] [Spirit of '76] bound\_address {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200 ([http://10.115.1.55:9200](http://10.115.1.55:9200)) ]}  
> > > [2012-02-09 16:23:35,169][INFO][node] [Spirit of '76] {0.18.7}[20144]: started  
> > > [2012-02-09 16:23:35,622][INFO][gateway] [Spirit of '76] recovered [4] indices into cluster\_state
> > > 
> > > First stop of the node  
> > > [2012-02-09 16:27:57,439][INFO][node] [Spirit of '76] {0.18.7}[20144]: stopping ...  
> > > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: stopped  
> > > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: closing ...  
> > > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: closed
> > > 
> > > Second start of the node  
> > > [2012-02-09 16:29:04,260][WARN][bootstrap] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line  
> > > [2012-02-09 16:29:04,276][INFO][node] [Hairbag] {0.18.7}[17148]: initializing ...  
> > > [2012-02-09 16:29:04,291][INFO][plugins] [Hairbag] loaded [mapper-attachments], sites   
> > > [2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: initialized  
> > > [2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: starting ...  
> > > [2012-02-09 16:29:06,603][INFO][transport] [Hairbag] bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300 ([http://10.115.1.55:9300](http://10.115.1.55:9300)) ]}  
> > > [2012-02-09 16:29:09,681][INFO][cluster.service] [Hairbag] new\_master [Hairbag][43JnSF1SRiW3yPINWcFZFg][inet[/10.115.1.55:9300]], reason: zen-disco-join (elected\_as\_master)  
> > > [2012-02-09 16:29:09,712][INFO][discovery] [Hairbag] BANACO\_DEV\_DPILATO/43JnSF1SRiW3yPINWcFZFg  
> > > [2012-02-09 16:29:09,806][INFO][http] [Hairbag] bound\_address {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200 ([http://10.115.1.55:9200](http://10.115.1.55:9200)) ]}  
> > > [2012-02-09 16:29:09,806][INFO][node] [Hairbag] {0.18.7}[17148]: started  
> > > [2012-02-09 16:29:10,291][INFO][gateway] [Hairbag] recovered [4] indices into cluster\_state
> > > 
> > > Thanks for your advice
> > > 
> > > --  
> > > David Pilato  
> > > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > > Twitter : @dadoonet
> 
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet

---

<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:** [February 12, 2012, 1:43pm UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658/6 "2012-02-12T13:43:52Z")

</div>

When I stop the node data and subdirs are here (but seems to be lighter 552 kb instead of 907 kb just before stopping).

When I start again, data are not here anymore. Es-head shows that there is 0 document in my index (but index and mappings still exist).

De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de Shay Banon  
Envoyé : dimanche 12 février 2012 14:17  
À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Objet : Re: Loosing all my docs when restarting my single node 0.18.7

I got lost a bit with the description. You mean that when you stop the node, the data (and its sub directories are there), and when you start it again, your search returns nothing, but they are still there, and es-head shows content?

On Thursday, February 9, 2012 at 7:37 PM, david@pilato.fr wrote:

Thanks Lukas for your interest.

I made more tests. First of all, I use very standard setup 5 shards 1 replica.

I moved my data dir to data.old and restart everything.

Everything is working fine. My docs doesn't disappear anymore.

I moved this new data dir to data.ok and move data.old to data and restart the test.

My docs disappears again.

So there was probably something wrong in my data...

Do you want me to send a copy of this _incorrect_ data dir ?

David.

Le 9 février 2012 à 17:35, "Lukáš Vlček" [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) a écrit :

Hi,  
How many shards and replicas your indices have? It is not clear from your log and is important in this scenario.  
Lukáš

Dne 9.2.2012 16:57 " david@pilato.fr " \< david@pilato.fr \> napsal(a):

Hi there,

Here is my case.

1. I start a fresh node 0.18.7 under windows with multicast=false and cluster.name set to BANACO\_DEV\_DPILATO

2. I define some index, alias and mappings.

3. I index in Java 373 documents.

4. I search for it using a TransportClient. I get back 373 documents.

I look at the data dir : 68 folders, 243 files, 907 Kb used

1. I stop the ES node I look at the data dir : 68 folders, 102 files, 552 Kb used

2. I start again the ES node

I search again for documents : 0 document exists Look at the data dir : 68 folders, 123 files, 3.39 Kb used

Using Mobz, I can see that my indexes, alias and mappings still exists.

But documents are not here anymore !

To kill the node, I use CTRL+C (or close command) in my Windows command box.

It was working fine in 0.17.10. I didn't test in 0.18. previous version.

What can I do to find the issue ? Any trace to activate ?

Here are the logs :  
First start of the node  
[2012-02-09 16:23:29,482][WARN][bootstrap] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line  
[2012-02-09 16:23:29,497][INFO][node] [Spirit of '76] {0.18.7}[20144]: initializing ...  
[2012-02-09 16:23:29,513][INFO][plugins] [Spirit of '76] loaded [mapper-attachments], sites []  
[2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]: initialized  
[2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]: starting ...  
[2012-02-09 16:23:31,888][INFO][transport] [Spirit of '76] bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300]}  
[2012-02-09 16:23:34,981][INFO][cluster.service] [Spirit of '76] new\_master [Spirit of '76][cmTmj1OfRa-O-pIrL4ddjg][inet[/10.115.1.55:9300]], reason: zen-disco-join (elected\_as\_master)  
[2012-02-09 16:23:35,044][INFO][discovery] [Spirit of '76] BANACO\_DEV\_DPILATO/cmTmj1OfRa-O-pIrL4ddjg  
[2012-02-09 16:23:35,153][INFO][http] [Spirit of '76] bound\_address {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200]}  
[2012-02-09 16:23:35,169][INFO][node] [Spirit of '76] {0.18.7}[20144]: started  
[2012-02-09 16:23:35,622][INFO][gateway] [Spirit of '76] recovered [4] indices into cluster\_state

First stop of the node  
[2012-02-09 16:27:57,439][INFO][node] [Spirit of '76] {0.18.7}[20144]: stopping ...  
[2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: stopped  
[2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: closing ...  
[2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: closed

Second start of the node  
[2012-02-09 16:29:04,260][WARN][bootstrap] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line  
[2012-02-09 16:29:04,276][INFO][node] [Hairbag] {0.18.7}[17148]: initializing ...  
[2012-02-09 16:29:04,291][INFO][plugins] [Hairbag] loaded [mapper-attachments], sites []  
[2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: initialized  
[2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: starting ...  
[2012-02-09 16:29:06,603][INFO][transport] [Hairbag] bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300]}  
[2012-02-09 16:29:09,681][INFO][cluster.service] [Hairbag] new\_master [Hairbag][43JnSF1SRiW3yPINWcFZFg][inet[/10.115.1.55:9300]], reason: zen-disco-join (elected\_as\_master)  
[2012-02-09 16:29:09,712][INFO][discovery] [Hairbag] BANACO\_DEV\_DPILATO/43JnSF1SRiW3yPINWcFZFg  
[2012-02-09 16:29:09,806][INFO][http] [Hairbag] bound\_address {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200]}  
[2012-02-09 16:29:09,806][INFO][node] [Hairbag] {0.18.7}[17148]: started  
[2012-02-09 16:29:10,291][INFO][gateway] [Hairbag] recovered [4] indices into cluster\_state

Thanks for your advice

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

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

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 12, 2012, 4:52pm UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658/7 "2012-02-12T16:52:26Z")

</div>

Are you setting the gateway.type to none? Are you sure that nothing else deletes the data? Try it with a simple "main" method and see if you loose the data with the config you use, this will exclude any other code running in your app.

On Sunday, February 12, 2012 at 3:43 PM, David Pilato wrote:

> When I stop the node data and subdirs are here (but seems to be lighter 552 kb instead of 907 kb just before stopping).
> 
> When I start again, data are not here anymore. Es-head shows that there is 0 document in my index (but index and mappings still exist).
> 
> De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de Shay Banon  
> Envoyé : dimanche 12 février 2012 14:17  
> À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) ([mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com))  
> Objet : Re: Loosing all my docs when restarting my single node 0.18.7
> 
> I got lost a bit with the description. You mean that when you stop the node, the data (and its sub directories are there), and when you start it again, your search returns nothing, but they are still there, and es-head shows content?
> 
> On Thursday, February 9, 2012 at 7:37 PM, [david@pilato.fr](mailto:david@pilato.fr) ([mailto:david@pilato.fr](mailto:david@pilato.fr)) wrote:
> 
> > Thanks Lukas for your interest.
> > 
> > I made more tests. First of all, I use very standard setup 5 shards 1 replica.
> > 
> > I moved my data dir to data.old and restart everything.
> > 
> > Everything is working fine. My docs doesn't disappear anymore.
> > 
> > I moved this new data dir to data.ok and move data.old to data and restart the test.
> > 
> > My docs disappears again.
> > 
> > So there was probably something wrong in my data...
> > 
> > Do you want me to send a copy of this _incorrect_ data dir ?
> > 
> > David.
> > 
> > Le 9 février 2012 à 17:35, "Lukáš Vlček" \<[lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) ([mailto:lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com))\> a écrit :
> > 
> > > Hi,  
> > > How many shards and replicas your indices have? It is not clear from your log and is important in this scenario.  
> > > Lukáš  
> > > Dne 9.2.2012 16:57 " [david@pilato.fr](mailto:david@pilato.fr) ([mailto:david@pilato.fr](mailto:david@pilato.fr)) " \< [david@pilato.fr](mailto:david@pilato.fr) ([mailto:david@pilato.fr](mailto:david@pilato.fr)) \> napsal(a):
> > > 
> > > > Hi there,
> > > > 
> > > > Here is my case.
> > > > 
> > > > 1. I start a fresh node 0.18.7 under windows with multicast=false and cluster.name ([http://cluster.name](http://cluster.name)) set to BANACO\_DEV\_DPILATO
> > > > 
> > > > 2. I define some index, alias and mappings.
> > > > 
> > > > 3. I index in Java 373 documents.
> > > > 
> > > > 4. I search for it using a TransportClient. I get back 373 documents.  
> > > > I look at the data dir : 68 folders, 243 files, 907 Kb used
> > > > 
> > > > 5. I stop the ES node I look at the data dir : 68 folders, 102 files, 552 Kb used
> > > > 
> > > > 6. I start again the ES node  
> > > > I search again for documents : 0 document exists Look at the data dir : 68 folders, 123 files, 3.39 Kb used
> > > > 
> > > > Using Mobz, I can see that my indexes, alias and mappings still exists.  
> > > > But documents are not here anymore !
> > > > 
> > > > To kill the node, I use CTRL+C (or close command) in my Windows command box.
> > > > 
> > > > It was working fine in 0.17.10. I didn't test in 0.18. previous version.
> > > > 
> > > > What can I do to find the issue ? Any trace to activate ?
> > > > 
> > > > Here are the logs :  
> > > > First start of the node  
> > > > [2012-02-09 16:23:29,482][WARN][bootstrap] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line  
> > > > [2012-02-09 16:23:29,497][INFO][node] [Spirit of '76] {0.18.7}[20144]: initializing ...  
> > > > [2012-02-09 16:23:29,513][INFO][plugins] [Spirit of '76] loaded [mapper-attachments], sites   
> > > > [2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]: initialized  
> > > > [2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]: starting ...  
> > > > [2012-02-09 16:23:31,888][INFO][transport] [Spirit of '76] bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300 ([http://10.115.1.55:9300](http://10.115.1.55:9300)) ]}  
> > > > [2012-02-09 16:23:34,981][INFO][cluster.service] [Spirit of '76] new\_master [Spirit of '76][cmTmj1OfRa-O-pIrL4ddjg][inet[/10.115.1.55:9300]], reason: zen-disco-join (elected\_as\_master)  
> > > > [2012-02-09 16:23:35,044][INFO][discovery] [Spirit of '76] BANACO\_DEV\_DPILATO/cmTmj1OfRa-O-pIrL4ddjg  
> > > > [2012-02-09 16:23:35,153][INFO][http] [Spirit of '76] bound\_address {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200 ([http://10.115.1.55:9200](http://10.115.1.55:9200)) ]}  
> > > > [2012-02-09 16:23:35,169][INFO][node] [Spirit of '76] {0.18.7}[20144]: started  
> > > > [2012-02-09 16:23:35,622][INFO][gateway] [Spirit of '76] recovered [4] indices into cluster\_state
> > > > 
> > > > First stop of the node  
> > > > [2012-02-09 16:27:57,439][INFO][node] [Spirit of '76] {0.18.7}[20144]: stopping ...  
> > > > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: stopped  
> > > > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: closing ...  
> > > > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: closed
> > > > 
> > > > Second start of the node  
> > > > [2012-02-09 16:29:04,260][WARN][bootstrap] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line  
> > > > [2012-02-09 16:29:04,276][INFO][node] [Hairbag] {0.18.7}[17148]: initializing ...  
> > > > [2012-02-09 16:29:04,291][INFO][plugins] [Hairbag] loaded [mapper-attachments], sites   
> > > > [2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: initialized  
> > > > [2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: starting ...  
> > > > [2012-02-09 16:29:06,603][INFO][transport] [Hairbag] bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300 ([http://10.115.1.55:9300](http://10.115.1.55:9300)) ]}  
> > > > [2012-02-09 16:29:09,681][INFO][cluster.service] [Hairbag] new\_master [Hairbag][43JnSF1SRiW3yPINWcFZFg][inet[/10.115.1.55:9300]], reason: zen-disco-join (elected\_as\_master)  
> > > > [2012-02-09 16:29:09,712][INFO][discovery] [Hairbag] BANACO\_DEV\_DPILATO/43JnSF1SRiW3yPINWcFZFg  
> > > > [2012-02-09 16:29:09,806][INFO][http] [Hairbag] bound\_address {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200 ([http://10.115.1.55:9200](http://10.115.1.55:9200)) ]}  
> > > > [2012-02-09 16:29:09,806][INFO][node] [Hairbag] {0.18.7}[17148]: started  
> > > > [2012-02-09 16:29:10,291][INFO][gateway] [Hairbag] recovered [4] indices into cluster\_state
> > > > 
> > > > Thanks for your advice
> > > > 
> > > > --  
> > > > David Pilato  
> > > > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > > > Twitter : @dadoonet
> > 
> > --  
> > David Pilato  
> > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > Twitter : @dadoonet

---

<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:** [February 12, 2012, 6:12pm UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658/8 "2012-02-12T18:12:15Z")

</div>

Hum. I cannot answer to the first question now cause it was at work.

But, something that I perhaps didn’t explain well is that I don’t run my own source code to start node or clients. I just run bin/elasticsearch.

My opinion is that I perhaps did something weird with my ES node and it remains a bad setting in it that makes data deleted after a restart.

As I said before, I can send the data dir of my ES node (the _crazy_ one) if you want to dig into it and find in debug mode why data are removed.

What’s the best tool to send it ? Direct mail to you ? Only 79kb.

David.

De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de Shay Banon  
Envoyé : dimanche 12 février 2012 17:52  
À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Objet : Re: Loosing all my docs when restarting my single node 0.18.7

Are you setting the gateway.type to none? Are you sure that nothing else deletes the data? Try it with a simple "main" method and see if you loose the data with the config you use, this will exclude any other code running in your app.

On Sunday, February 12, 2012 at 3:43 PM, David Pilato wrote:

When I stop the node data and subdirs are here (but seems to be lighter 552 kb instead of 907 kb just before stopping).

When I start again, data are not here anymore. Es-head shows that there is 0 document in my index (but index and mappings still exist).

De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de Shay Banon  
Envoyé : dimanche 12 février 2012 14:17  
À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Objet : Re: Loosing all my docs when restarting my single node 0.18.7

I got lost a bit with the description. You mean that when you stop the node, the data (and its sub directories are there), and when you start it again, your search returns nothing, but they are still there, and es-head shows content?

On Thursday, February 9, 2012 at 7:37 PM, david@pilato.fr wrote:

Thanks Lukas for your interest.

I made more tests. First of all, I use very standard setup 5 shards 1 replica.

I moved my data dir to data.old and restart everything.

Everything is working fine. My docs doesn't disappear anymore.

I moved this new data dir to data.ok and move data.old to data and restart the test.

My docs disappears again.

So there was probably something wrong in my data...

Do you want me to send a copy of this _incorrect_ data dir ?

David.

Le 9 février 2012 à 17:35, "Lukáš Vlček" [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) a écrit :

Hi,  
How many shards and replicas your indices have? It is not clear from your log and is important in this scenario.  
Lukáš

Dne 9.2.2012 16:57 " david@pilato.fr " \< david@pilato.fr \> napsal(a):

Hi there,

Here is my case.

1. I start a fresh node 0.18.7 under windows with multicast=false and cluster.name set to BANACO\_DEV\_DPILATO

2. I define some index, alias and mappings.

3. I index in Java 373 documents.

4. I search for it using a TransportClient. I get back 373 documents.

I look at the data dir : 68 folders, 243 files, 907 Kb used

1. I stop the ES node I look at the data dir : 68 folders, 102 files, 552 Kb used

2. I start again the ES node

I search again for documents : 0 document exists Look at the data dir : 68 folders, 123 files, 3.39 Kb used

Using Mobz, I can see that my indexes, alias and mappings still exists.

But documents are not here anymore !

To kill the node, I use CTRL+C (or close command) in my Windows command box.

It was working fine in 0.17.10. I didn't test in 0.18. previous version.

What can I do to find the issue ? Any trace to activate ?

Here are the logs :  
First start of the node  
[2012-02-09 16:23:29,482][WARN][bootstrap] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line  
[2012-02-09 16:23:29,497][INFO][node] [Spirit of '76] {0.18.7}[20144]: initializing ...  
[2012-02-09 16:23:29,513][INFO][plugins] [Spirit of '76] loaded [mapper-attachments], sites []  
[2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]: initialized  
[2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]: starting ...  
[2012-02-09 16:23:31,888][INFO][transport] [Spirit of '76] bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300]}  
[2012-02-09 16:23:34,981][INFO][cluster.service] [Spirit of '76] new\_master [Spirit of '76][cmTmj1OfRa-O-pIrL4ddjg][inet[/10.115.1.55:9300]], reason: zen-disco-join (elected\_as\_master)  
[2012-02-09 16:23:35,044][INFO][discovery] [Spirit of '76] BANACO\_DEV\_DPILATO/cmTmj1OfRa-O-pIrL4ddjg  
[2012-02-09 16:23:35,153][INFO][http] [Spirit of '76] bound\_address {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200]}  
[2012-02-09 16:23:35,169][INFO][node] [Spirit of '76] {0.18.7}[20144]: started  
[2012-02-09 16:23:35,622][INFO][gateway] [Spirit of '76] recovered [4] indices into cluster\_state

First stop of the node  
[2012-02-09 16:27:57,439][INFO][node] [Spirit of '76] {0.18.7}[20144]: stopping ...  
[2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: stopped  
[2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: closing ...  
[2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: closed

Second start of the node  
[2012-02-09 16:29:04,260][WARN][bootstrap] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line  
[2012-02-09 16:29:04,276][INFO][node] [Hairbag] {0.18.7}[17148]: initializing ...  
[2012-02-09 16:29:04,291][INFO][plugins] [Hairbag] loaded [mapper-attachments], sites []  
[2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: initialized  
[2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: starting ...  
[2012-02-09 16:29:06,603][INFO][transport] [Hairbag] bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300]}  
[2012-02-09 16:29:09,681][INFO][cluster.service] [Hairbag] new\_master [Hairbag][43JnSF1SRiW3yPINWcFZFg][inet[/10.115.1.55:9300]], reason: zen-disco-join (elected\_as\_master)  
[2012-02-09 16:29:09,712][INFO][discovery] [Hairbag] BANACO\_DEV\_DPILATO/43JnSF1SRiW3yPINWcFZFg  
[2012-02-09 16:29:09,806][INFO][http] [Hairbag] bound\_address {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200]}  
[2012-02-09 16:29:09,806][INFO][node] [Hairbag] {0.18.7}[17148]: started  
[2012-02-09 16:29:10,291][INFO][gateway] [Hairbag] recovered [4] indices into cluster\_state

Thanks for your advice

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

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

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 12, 2012, 10:17pm UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658/9 "2012-02-12T22:17:01Z")

</div>

I see. I don't think the actual index will help, but a full recreation will. Let me verify the steps:

1. You start elasticsearch.
2. Index data using the TransportClient, query it (using es-head for example) and you see the data there.
3. Stop your program, check the ES server, still holds data.
4. Stop the ES node.
5. Start the ES node (and just the node).
6. No docs in the relevant indices?

Are those the correct steps?

On Sunday, February 12, 2012 at 8:12 PM, David Pilato wrote:

> Hum. I cannot answer to the first question now cause it was at work.
> 
> But, something that I perhaps didn’t explain well is that I don’t run my own source code to start node or clients. I just run bin/elasticsearch.
> 
> My opinion is that I perhaps did something weird with my ES node and it remains a bad setting in it that makes data deleted after a restart.
> 
> As I said before, I can send the data dir of my ES node (the _crazy_ one) if you want to dig into it and find in debug mode why data are removed.
> 
> What’s the best tool to send it ? Direct mail to you ? Only 79kb.
> 
> David.
> 
> De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de Shay Banon  
> Envoyé : dimanche 12 février 2012 17:52  
> À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) ([mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com))  
> Objet : Re: Loosing all my docs when restarting my single node 0.18.7
> 
> Are you setting the gateway.type to none? Are you sure that nothing else deletes the data? Try it with a simple "main" method and see if you loose the data with the config you use, this will exclude any other code running in your app.
> 
> On Sunday, February 12, 2012 at 3:43 PM, David Pilato wrote:
> 
> > When I stop the node data and subdirs are here (but seems to be lighter 552 kb instead of 907 kb just before stopping).
> > 
> > When I start again, data are not here anymore. Es-head shows that there is 0 document in my index (but index and mappings still exist).
> > 
> > De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) ([mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de Shay Banon  
> > Envoyé : dimanche 12 février 2012 14:17  
> > À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) ([mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com))  
> > Objet : Re: Loosing all my docs when restarting my single node 0.18.7
> > 
> > I got lost a bit with the description. You mean that when you stop the node, the data (and its sub directories are there), and when you start it again, your search returns nothing, but they are still there, and es-head shows content?
> > 
> > On Thursday, February 9, 2012 at 7:37 PM, [david@pilato.fr](mailto:david@pilato.fr) ([mailto:david@pilato.fr](mailto:david@pilato.fr)) wrote:
> > 
> > > Thanks Lukas for your interest.
> > > 
> > > I made more tests. First of all, I use very standard setup 5 shards 1 replica.
> > > 
> > > I moved my data dir to data.old and restart everything.
> > > 
> > > Everything is working fine. My docs doesn't disappear anymore.
> > > 
> > > I moved this new data dir to data.ok and move data.old to data and restart the test.
> > > 
> > > My docs disappears again.
> > > 
> > > So there was probably something wrong in my data...
> > > 
> > > Do you want me to send a copy of this _incorrect_ data dir ?
> > > 
> > > David.
> > > 
> > > Le 9 février 2012 à 17:35, "Lukáš Vlček" \<[lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) ([mailto:lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com))\> a écrit :
> > > 
> > > > Hi,  
> > > > How many shards and replicas your indices have? It is not clear from your log and is important in this scenario.  
> > > > Lukáš  
> > > > Dne 9.2.2012 16:57 " [david@pilato.fr](mailto:david@pilato.fr) ([mailto:david@pilato.fr](mailto:david@pilato.fr)) " \< [david@pilato.fr](mailto:david@pilato.fr) ([mailto:david@pilato.fr](mailto:david@pilato.fr)) \> napsal(a):
> > > > 
> > > > > Hi there,
> > > > > 
> > > > > Here is my case.
> > > > > 
> > > > > 1. I start a fresh node 0.18.7 under windows with multicast=false and cluster.name ([http://cluster.name](http://cluster.name)) set to BANACO\_DEV\_DPILATO
> > > > > 
> > > > > 2. I define some index, alias and mappings.
> > > > > 
> > > > > 3. I index in Java 373 documents.
> > > > > 
> > > > > 4. I search for it using a TransportClient. I get back 373 documents.  
> > > > > I look at the data dir : 68 folders, 243 files, 907 Kb used
> > > > > 
> > > > > 5. I stop the ES node I look at the data dir : 68 folders, 102 files, 552 Kb used
> > > > > 
> > > > > 6. I start again the ES node  
> > > > > I search again for documents : 0 document exists Look at the data dir : 68 folders, 123 files, 3.39 Kb used
> > > > > 
> > > > > Using Mobz, I can see that my indexes, alias and mappings still exists.  
> > > > > But documents are not here anymore !
> > > > > 
> > > > > To kill the node, I use CTRL+C (or close command) in my Windows command box.
> > > > > 
> > > > > It was working fine in 0.17.10. I didn't test in 0.18. previous version.
> > > > > 
> > > > > What can I do to find the issue ? Any trace to activate ?
> > > > > 
> > > > > Here are the logs :  
> > > > > First start of the node  
> > > > > [2012-02-09 16:23:29,482][WARN][bootstrap] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line  
> > > > > [2012-02-09 16:23:29,497][INFO][node] [Spirit of '76] {0.18.7}[20144]: initializing ...  
> > > > > [2012-02-09 16:23:29,513][INFO][plugins] [Spirit of '76] loaded [mapper-attachments], sites   
> > > > > [2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]: initialized  
> > > > > [2012-02-09 16:23:31,763][INFO][node] [Spirit of '76] {0.18.7}[20144]: starting ...  
> > > > > [2012-02-09 16:23:31,888][INFO][transport] [Spirit of '76] bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300 ([http://10.115.1.55:9300](http://10.115.1.55:9300)) ]}  
> > > > > [2012-02-09 16:23:34,981][INFO][cluster.service] [Spirit of '76] new\_master [Spirit of '76][cmTmj1OfRa-O-pIrL4ddjg][inet[/10.115.1.55:9300]], reason: zen-disco-join (elected\_as\_master)  
> > > > > [2012-02-09 16:23:35,044][INFO][discovery] [Spirit of '76] BANACO\_DEV\_DPILATO/cmTmj1OfRa-O-pIrL4ddjg  
> > > > > [2012-02-09 16:23:35,153][INFO][http] [Spirit of '76] bound\_address {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200 ([http://10.115.1.55:9200](http://10.115.1.55:9200)) ]}  
> > > > > [2012-02-09 16:23:35,169][INFO][node] [Spirit of '76] {0.18.7}[20144]: started  
> > > > > [2012-02-09 16:23:35,622][INFO][gateway] [Spirit of '76] recovered [4] indices into cluster\_state
> > > > > 
> > > > > First stop of the node  
> > > > > [2012-02-09 16:27:57,439][INFO][node] [Spirit of '76] {0.18.7}[20144]: stopping ...  
> > > > > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: stopped  
> > > > > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: closing ...  
> > > > > [2012-02-09 16:27:57,564][INFO][node] [Spirit of '76] {0.18.7}[20144]: closed
> > > > > 
> > > > > Second start of the node  
> > > > > [2012-02-09 16:29:04,260][WARN][bootstrap] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line  
> > > > > [2012-02-09 16:29:04,276][INFO][node] [Hairbag] {0.18.7}[17148]: initializing ...  
> > > > > [2012-02-09 16:29:04,291][INFO][plugins] [Hairbag] loaded [mapper-attachments], sites   
> > > > > [2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: initialized  
> > > > > [2012-02-09 16:29:06,447][INFO][node] [Hairbag] {0.18.7}[17148]: starting ...  
> > > > > [2012-02-09 16:29:06,603][INFO][transport] [Hairbag] bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/ 10.115.1.55:9300 ([http://10.115.1.55:9300](http://10.115.1.55:9300)) ]}  
> > > > > [2012-02-09 16:29:09,681][INFO][cluster.service] [Hairbag] new\_master [Hairbag][43JnSF1SRiW3yPINWcFZFg][inet[/10.115.1.55:9300]], reason: zen-disco-join (elected\_as\_master)  
> > > > > [2012-02-09 16:29:09,712][INFO][discovery] [Hairbag] BANACO\_DEV\_DPILATO/43JnSF1SRiW3yPINWcFZFg  
> > > > > [2012-02-09 16:29:09,806][INFO][http] [Hairbag] bound\_address {inet[/0.0.0.0:9200]}, publish\_address {inet[/ 10.115.1.55:9200 ([http://10.115.1.55:9200](http://10.115.1.55:9200)) ]}  
> > > > > [2012-02-09 16:29:09,806][INFO][node] [Hairbag] {0.18.7}[17148]: started  
> > > > > [2012-02-09 16:29:10,291][INFO][gateway] [Hairbag] recovered [4] indices into cluster\_state
> > > > > 
> > > > > Thanks for your advice
> > > > > 
> > > > > --  
> > > > > David Pilato  
> > > > > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > > > > Twitter : @dadoonet
> > > 
> > > --  
> > > David Pilato  
> > > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > > Twitter : @dadoonet

---

<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:39am UTC](https://discuss.elastic.co/t/loosing-all-my-docs-when-restarting-my-single-node-0-18-7/6658/10 "2017-07-06T03:39:39Z")

</div>


