# Node client will not respect master node "action.auto\_create\_index: false"

**URL:** <https://discuss.elastic.co/t/node-client-will-not-respect-master-node-action-auto-create-index-false/59106>\
**Category:** Elasticsearch\
**Created:** [August 28, 2016, 3:36am UTC](https://discuss.elastic.co/t/node-client-will-not-respect-master-node-action-auto-create-index-false/59106 "2016-08-28T03:36:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![itplayer](https://avatars.discourse-cdn.com/v4/letter/i/d26b3c/32.png) [@itplayer](https://discuss.elastic.co/u/itplayer)\
**Post date:** [August 28, 2016, 3:36am UTC](https://discuss.elastic.co/t/node-client-will-not-respect-master-node-action-auto-create-index-false/59106/1 "2016-08-28T03:36:14Z")

</div>

Hi,  
I found a situation but I'm not sure s this normal or not.  
I have a Elasticsearch cluster with two nodes lest say A and B.  
A is master node, B is not, but they held data.  
Both of them were set action.auto\_create\_index:false in elasticseach.yml.

When I create a java application that use node client to send index request. The Index will created automatically if it is not existed.

After tracing and step into runtime execution, I found if node client config missed this setting (or set as true) Index will be created, otherwise no.

Is this normal or not?  
I thought if Master node decide "action.auto\_create\_index: false", each node in cluster should respect this setting.  
Any idea?

I use Elasticearch v1.7.2 and you can see  
AutoCreateIndex.java file located in org.elasticsearch.action.support package

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [August 30, 2016, 11:49am UTC](https://discuss.elastic.co/t/node-client-will-not-respect-master-node-action-auto-create-index-false/59106/2 "2016-08-30T11:49:46Z")

</div>

Hi @itplayer,

quoting from the [user docs](https://www.elastic.co/guide/en/elasticsearch/reference/1.7/docs-index_.html#index-creation) (emphasis mine):

> Automatic index creation can be disabled by setting action.auto\_create\_index to false **in the config file of all nodes**.

As the node client joins the cluster as yet another node (hence the name node client), you need to define this setting also in your client.

Daniel

---

<div class="post-metadata">

**Author:** ![itplayer](https://avatars.discourse-cdn.com/v4/letter/i/d26b3c/32.png) [@itplayer](https://discuss.elastic.co/u/itplayer)\
**Post date:** [August 30, 2016, 1:36pm UTC](https://discuss.elastic.co/t/node-client-will-not-respect-master-node-action-auto-create-index-false/59106/3 "2016-08-30T13:36:15Z")

</div>

@danielmitterdorfer  
Thanks for you information, I already added this setting in my node client when creation. But if the whole cluster can automatically receive this setting from master node(or better if the setting is cluster-wide).

---

<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 5, 2017, 10:24pm UTC](https://discuss.elastic.co/t/node-client-will-not-respect-master-node-action-auto-create-index-false/59106/4 "2017-07-05T22:24:01Z")

</div>


