# Disable auto\_import\_dangled for ES 6.2

**URL:** https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801
**Category:** Elasticsearch
**Created:** [March 20, 2018, 3:00pm UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801 "2018-03-20T15:00:22Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Ihjaz](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@Ihjaz](https://discuss.elastic.co/u/Ihjaz)
#### Post date: [March 20, 2018, 3:00pm UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/1 "2018-03-20T15:00:22Z")

</div>

It seems like the setting "gateway.local.auto\_import\_dangled: no" is not supported for the Elasticsearch 6.2. I'm getting the below exception if I use this setting.

> java.lang.IllegalArgumentException: unknown setting [gateway.local.auto\_import\_dangled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

What is the new way to disable auto import of dangled indices for ES 6.2?

---

<div class="post-metadata">

### Author: ![Ihjaz](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@Ihjaz](https://discuss.elastic.co/u/Ihjaz)
#### Post date: [March 21, 2018, 6:41am UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/2 "2018-03-21T06:41:09Z")

</div>

Hi,

Can someone please help me on this? My Elasticsearch cluster goes into an unusable state because of auto import.  
My alias starts pointing to two indices after auto import and then the Logstash stops logging to the cluster.

---

<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: [March 21, 2018, 6:52am UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/3 "2018-03-21T06:52:57Z")

</div>

Remove the alias on the index you don't want to have an alias anymore?

I think I saw recent changes that might fix the issue with old settings.  
May be upgrade to 6.2.3?

---

<div class="post-metadata">

### Author: ![Ihjaz](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@Ihjaz](https://discuss.elastic.co/u/Ihjaz)
#### Post date: [March 21, 2018, 7:09am UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/4 "2018-03-21T07:09:39Z")

</div>

Hi,

I'm using the alias as I need to rollover the index once it gets to certain size.

Can the rollover be done without the alias on ES 6.2?

> [@dadoonet](#):
>
> I think I saw recent changes that might fix the issue with old settings.  
> May be upgrade to 6.2.3?

Sorry I'm not sure I understood this. What issue is fixed in 6.2.3?

---

<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: [March 21, 2018, 8:47am UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/5 "2018-03-21T08:47:53Z")

</div>

> [@Ihjaz](#):
>
> What issue is fixed in 6.2.3?

The error you mentioned before about `unknown setting` . It might have been fixed. Didn't check as typing on a mobile now.

I'm confused too by the relationship between this error and aliases.  
It doesn't seem to be related.

Anyway, may be you set the alias in a template instead of letting the rollover API.

I've seen recently a similar case on this forum.

---

<div class="post-metadata">

### Author: ![Ihjaz](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@Ihjaz](https://discuss.elastic.co/u/Ihjaz)
#### Post date: [March 21, 2018, 10:11am UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/6 "2018-03-21T10:11:23Z")

</div>

> [@dadoonet](#):
>
> I'm confused too by the relationship between this error and aliases.
> 
> It doesn't seem to be related.

Let me explain my scenario. I'm using rollover API with an alias and the alias always points to the latest index created during the rollover.

When an dangling index gets auto imported, the alias ends up pointing to the latest index and also the newly imported index. Logstash then throws the below error and stops writing to the Elasticsearch.

> [ERROR][logstash.outputs.elasticsearch] Encountered a retryable error. Will Retry with exponential backoff {:code=\>400, :url=\>"[http://10.133.132.122:9200/\_bulk](http://10.133.132.122:9200/_bulk)", :body=\>"{"error":{"root\_cause":[{"type":"illegal\_argument\_exception","reason":"Alias [filebeat\_logs] has more than one indices associated with it [[filebeat-2018.03.16-000007, filebeat-2018.03.16-000006]], can't execute a single index op"}],"type":"illegal\_argument\_exception","reason":"Alias [filebeat\_logs] has more than one indices associated with it [[filebeat-2018.03.16-000007, filebeat-2018.03.16-000006]], can't execute a single index op"},"status":400}"}

---

<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: [March 21, 2018, 10:23am UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/7 "2018-03-21T10:23:54Z")

</div>

If your index `filebeat-2018.03.16-000006` has been imported, then remove the alias `filebeat_logs` from it.

---

<div class="post-metadata">

### Author: ![Ihjaz](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@Ihjaz](https://discuss.elastic.co/u/Ihjaz)
#### Post date: [March 21, 2018, 10:54am UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/8 "2018-03-21T10:54:59Z")

</div>

I need to prevent the cluster from going into this state on a production environment.

---

<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: [March 21, 2018, 11:32am UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/9 "2018-03-21T11:32:58Z")

</div>

I see now what you meant.

The question is why you are in such a state.  
I mean that you might have loose all the master elligible nodes, right?

From [https://www.elastic.co/guide/en/elasticsearch/reference/master/\_dangling\_indices.html](https://www.elastic.co/guide/en/elasticsearch/reference/master/_dangling_indices.html)

> When a node joins the cluster, any shards stored in its local data directory directory which do not already exist in the cluster will be imported into the cluster. This functionality is intended as a best effort to help users who lose all master nodes. If a new master node is started which is unaware of the other indices in the cluster, adding the old nodes will cause the old indices to be imported, instead of being deleted.

---

<div class="post-metadata">

### Author: ![Ihjaz](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@Ihjaz](https://discuss.elastic.co/u/Ihjaz)
#### Post date: [March 21, 2018, 12:18pm UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/10 "2018-03-21T12:18:10Z")

</div>

I saw the cluster getting into this state on a production environment when there was some connectivity issues between the nodes.

I reproduced this in my lab with two nodes in the cluster. I stopped the network service of one of the node thus breaking the communication between the nodes and the nodes went out of sync. When the network connectivity was resumed, indices on the nodes were still out of sync.  
Restarting the ES on one of the nodes brought the indices in sync but there were some dangling indices on the node with the same name which already exist in the cluster. After a while that index from the cluster got deleted as part of rollover and the dangling index with the same name got auto imported. This made the alias to point to the latest index and the imported index.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [March 21, 2018, 12:27pm UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/11 "2018-03-21T12:27:44Z")

</div>

When you did this with two nodes, did you have both nodes master eligible? If so, did you have `minimum_master_nodes` correctly set to 2 in order to avoid split brain scenarios?

More important - is your production system set up [according to these guidelines](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-node.html#split-brain)?

---

<div class="post-metadata">

### Author: ![Ihjaz](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@Ihjaz](https://discuss.elastic.co/u/Ihjaz)
#### Post date: [March 21, 2018, 1:29pm UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/12 "2018-03-21T13:29:35Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> When you did this with two nodes, did you have both nodes master eligible? If so, did you have minimum\_master\_nodes correctly set to 2 in order to avoid split brain scenarios?

Both nodes were master eligible but I did not have the minimum\_master\_nodes configured. This setting was commented out so I believe it took the default value of 1.

---

<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: [April 18, 2018, 1:29pm UTC](https://discuss.elastic.co/t/disable-auto-import-dangled-for-es-6-2/124801/13 "2018-04-18T13:29:46Z")

</div>

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