# Indeces is being created on the master machines

**URL:** <https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206>\
**Category:** Elasticsearch\
**Created:** [February 27, 2020, 10:08am UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206 "2020-02-27T10:08:26Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Burga](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@Burga](https://discuss.elastic.co/u/Burga)\
**Post date:** [February 27, 2020, 10:08am UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/1 "2020-02-27T10:08:26Z")

</div>

Hi , I'm new in Elastic world , we have a few master nodes , data nodes , logstash nodes and 2 ing nodes , 4 days a go indexes began to be written to the master nodes also , need your advice , what could be the reason and what is the solution ?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ahmed\_charafouddine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmed_charafouddine/32/45129_2.png) [@ahmed\_charafouddine](https://discuss.elastic.co/u/ahmed_charafouddine)\
**Post date:** [February 27, 2020, 10:14am UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/2 "2020-02-27T10:14:12Z")

</div>

Yes this is normal because the nodes are both data although it is master

---

<div class="post-metadata">

**Author:** ![Burga](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@Burga](https://discuss.elastic.co/u/Burga)\
**Post date:** [February 27, 2020, 10:42am UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/3 "2020-02-27T10:42:12Z")

</div>

Thanks for the answer , I forgot to mention that the master nodes are only master (though on the main master node I see only node.master: true without node.data: false, but on the rest I have node.master: true and node.data: false) , can it be the issue ?

---

<div class="post-metadata">

**Author:** ![ahmed\_charafouddine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmed_charafouddine/32/45129_2.png) [@ahmed\_charafouddine](https://discuss.elastic.co/u/ahmed_charafouddine)\
**Post date:** [February 27, 2020, 10:44am UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/4 "2020-02-27T10:44:01Z")

</div>

Can I have a visibility of the config files of your nodes?

---

<div class="post-metadata">

**Author:** ![Burga](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@Burga](https://discuss.elastic.co/u/Burga)\
**Post date:** [February 27, 2020, 11:01am UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/5 "2020-02-27T11:01:02Z")

</div>

master1

# Set the bind address to a specific IP (IPv4 or IPv6):

# 

network.host: [192.168.126.51, _local_]  
network.bind\_host: 192.168.126.51

node.master: true

# 

# Set a custom port for HTTP:

# 

#http.port: 9200

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when this node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

# 

discovery.seed\_hosts: ["192.168.126.52","192.168.126.53","192.168.126.54","192.168.126.55","192.168.126.56"]

# 

# Bootstrap the cluster using an initial set of master-el

cluster.initial\_master\_nodes: ["192.168.126.55"]

master 2

network.host: [192.168.126.52, _local_]

node.master: true

node.data: false

#node.ingest: false

# 

# Set a custom port for HTTP:

# 

#http.port: 9200

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when this node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

# 

discovery.seed\_hosts: ["192.168.126.51", "192.168.126.53"]

# 

# Bootstrap the cluster using an initial set of master-eligible nodes:

# 

cluster.initial\_master\_nodes: ["192.168.126.55"]

# 

master 3

node.master: true

node.data: false

node.ingest: false

# 

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

# ---------------------------------- Network -----------------------------------

# 

# Set the bind address to a specific IP (IPv4 or IPv6):

# 

network.host: [192.168.126.53, _local_]

# 

# Set a custom port for HTTP:

# 

#http.port: 9200

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when this node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

discovery.seed\_hosts: ["192.168.126.52","192.168.126.51","192.168.126.54","192.168.126.55","192.168.126.56"]

# 

# Bootstrap the cluster using an initial set of master-eligible nodes:

# 

#cluster.initial\_master\_nodes: ["node-1", "node-2"]

by the way on the discovery.seed\_hosts it shouldnt be the same number of hosts in the 3 masters ? Moreover the logstash and Ingest nodes shouldnt be in the list ?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ahmed\_charafouddine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmed_charafouddine/32/45129_2.png) [@ahmed\_charafouddine](https://discuss.elastic.co/u/ahmed_charafouddine)\
**Post date:** [February 27, 2020, 11:18am UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/6 "2020-02-27T11:18:03Z")

</div>

> [@Burga](#):
>
> Moreover the logstash

There is no logstash node. logstash is an instance outside the elasticsearch cluster. And effectively among the roles of an elasticsearch node, ingest node to pre-process documents before the actual document indexing happens. But you can just use logstash.

> [@Burga](#):
>
> by the way on the discovery.seed\_hosts it shouldnt be the same number of hosts in the 3 masters ?

these are the parameters which allow you to be able to elect a master in the cluster in a subset of the eligible master. So this will be the list of eligible masters

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 27, 2020, 11:22am UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/7 "2020-02-27T11:22:44Z")

</div>

> [@Burga](#):
>
> on the main master node I see only node.master: true without node.data: false

The default for `node.data` is `true`. You must explicitly set `node.data: false` if you do not want a node to be a data node. The full collection of settings for a dedicated master node are [in the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#dedicated-master-node).

---

<div class="post-metadata">

**Author:** ![Burga](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@Burga](https://discuss.elastic.co/u/Burga)\
**Post date:** [February 27, 2020, 12:21pm UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/8 "2020-02-27T12:21:41Z")

</div>

Thank you guys a lot .

---

<div class="post-metadata">

**Author:** ![Burga](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@Burga](https://discuss.elastic.co/u/Burga)\
**Post date:** [February 27, 2020, 2:08pm UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/9 "2020-02-27T14:08:31Z")

</div>

I added node.data: false to the master elasticsearch.yml file

but the service can't be started , in the log written that --\>

"Node is started with node.data=false, but has shard data ...  
....  
....  
Use 'elasticsearch-node repurpose' tool to clean up"

what is the best way to solve this issue

to run "elasticsearch-node repurpose" ?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 27, 2020, 2:27pm UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/10 "2020-02-27T14:27:49Z")

</div>

The simplest thing to do is wipe this node and start again -- if your cluster health is `green` then this won't lose any data.

---

<div class="post-metadata">

**Author:** ![Burga](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@Burga](https://discuss.elastic.co/u/Burga)\
**Post date:** [February 27, 2020, 2:40pm UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/11 "2020-02-27T14:40:28Z")

</div>

This is what I did , but due to shards that were created before , service cant be bring ed up , it tells that first of all delete all indexes on the host(doesn't let me bring service with node.data=false).

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 27, 2020, 3:07pm UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/12 "2020-02-27T15:07:14Z")

</div>

Indeed - that's why (if your cluster health is `green`) I suggest wiping the node, i.e. deleting its whole data path. There are other ways forward if you cannot get your cluster health to `green` but they're much more complicated and risky.

---

<div class="post-metadata">

**Author:** ![Burga](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@Burga](https://discuss.elastic.co/u/Burga)\
**Post date:** [February 27, 2020, 3:26pm UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/13 "2020-02-27T15:26:15Z")

</div>

Thank you .

---

<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:** [March 26, 2020, 3:26pm UTC](https://discuss.elastic.co/t/indeces-is-being-created-on-the-master-machines/221206/14 "2020-03-26T15:26:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
