# Changing cluster name on 2-node cluster causes IndexMissingException

**URL:** <https://discuss.elastic.co/t/changing-cluster-name-on-2-node-cluster-causes-indexmissingexception/12079>\
**Category:** Elasticsearch\
**Created:** [May 22, 2013, 6:58pm UTC](https://discuss.elastic.co/t/changing-cluster-name-on-2-node-cluster-causes-indexmissingexception/12079 "2013-05-22T18:58:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Phunk\_Gadoury](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@Brian\_Phunk\_Gadoury](https://discuss.elastic.co/u/Brian_Phunk_Gadoury)\
**Post date:** [May 22, 2013, 6:58pm UTC](https://discuss.elastic.co/t/changing-cluster-name-on-2-node-cluster-causes-indexmissingexception/12079/1 "2013-05-22T18:58:29Z")

</div>

Steps to reproduce:

1. Create a 2-node cluster
2. Create a new index
3. Add one doc to the index
4. Take cluster down using Nodes Shutdown API
5. Change cluster.name in elasticsearch.yml on both nodes
6. service elasticsearch start on both nodes
7. Cluster comes up OK, looks like working cluster in BigDesk
8. Queries against your previously-working index return  
IndexMissingException

And if I change the cluster name back to its original name and restart the  
cluster, the index works fine again.

Is this a bug? Design limitation? Pilot error?

--  
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:** ![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:** [May 22, 2013, 7:05pm UTC](https://discuss.elastic.co/t/changing-cluster-name-on-2-node-cluster-causes-indexmissingexception/12079/2 "2013-05-22T19:05:56Z")

</div>

If you want to rename a cluster you will have to modify that name also in /data dir.

For example:

mv ./data/elasticsearch ./data/mynewclustername

On all nodes.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 22 mai 2013 à 20:58, Brian Gadoury [bgadoury@endpoint.com](mailto:bgadoury@endpoint.com) a écrit :

> Steps to reproduce:  
> Create a 2-node cluster  
> Create a new index  
> Add one doc to the index  
> Take cluster down using Nodes Shutdown API  
> Change cluster.name in elasticsearch.yml on both nodes  
> service elasticsearch start on both nodes  
> Cluster comes up OK, looks like working cluster in BigDesk  
> Queries against your previously-working index return IndexMissingException  
> And if I change the cluster name back to its original name and restart the cluster, the index works fine again.
> 
> Is this a bug? Design limitation? Pilot error?
> 
> --  
> 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:** ![drewr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drewr/32/7803_2.png) [@drewr](https://discuss.elastic.co/u/drewr)\
**Post date:** [May 22, 2013, 7:10pm UTC](https://discuss.elastic.co/t/changing-cluster-name-on-2-node-cluster-causes-indexmissingexception/12079/3 "2013-05-22T19:10:18Z")

</div>

Brian Gadoury wrote:

[...]

> And if I change the cluster name back to its original name and  
> restart the  
> cluster, the index works fine again.
> 
> Is this a bug? Design limitation? Pilot error?

Feature. The index data reside on disk in a path partially  
defined by the cluster name. Once you changed it, ES created a  
new folder structure. When you changed it back, it used the  
original data.

Drew

--  
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:** ![Brian\_Phunk\_Gadoury](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@Brian\_Phunk\_Gadoury](https://discuss.elastic.co/u/Brian_Phunk_Gadoury)\
**Post date:** [May 22, 2013, 8:08pm UTC](https://discuss.elastic.co/t/changing-cluster-name-on-2-node-cluster-causes-indexmissingexception/12079/4 "2013-05-22T20:08:12Z")

</div>

Thanks gents!

--  
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:35am UTC](https://discuss.elastic.co/t/changing-cluster-name-on-2-node-cluster-causes-indexmissingexception/12079/5 "2017-07-06T02:35:20Z")

</div>


