# Failed to delete indices when curator configured for multiple hosts in same cluster

**URL:** <https://discuss.elastic.co/t/failed-to-delete-indices-when-curator-configured-for-multiple-hosts-in-same-cluster/109373>\
**Category:** Elasticsearch\
**Created:** [November 28, 2017, 11:21am UTC](https://discuss.elastic.co/t/failed-to-delete-indices-when-curator-configured-for-multiple-hosts-in-same-cluster/109373 "2017-11-28T11:21:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shivanshu\_Bagga](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Shivanshu\_Bagga](https://discuss.elastic.co/u/Shivanshu_Bagga)\
**Post date:** [November 28, 2017, 11:21am UTC](https://discuss.elastic.co/t/failed-to-delete-indices-when-curator-configured-for-multiple-hosts-in-same-cluster/109373/1 "2017-11-28T11:21:47Z")

</div>

Here is my curator.yml configuration-

```auto
client:
  hosts:
    - 192.168.101.188
    - 192.168.10.136
  port: 9200
  url_prefix:
  use_ssl: False
  certificate:
  client_cert:
  client_key:
  ssl_no_validate: False
  http_auth:
  timeout: 30
  master_only: False

logging:
  loglevel: INFO
  logfile:
  logformat: default
  blacklist: ['elasticsearch', 'urllib3']

```

and action.yml file -

```auto
actions:
  1:
    action: delete_indices
    description: >-
      Delete indices.
    options:
      ignore_empty_list: True
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: logstash-

```

If I'm running with above configuration getting following error.-

```auto
2017-11-28 16:39:20,289 INFO Preparing Action ID: 1, "delete_indices"
2017-11-28 16:39:20,326 INFO Trying Action ID: 1, "delete_indices": Delete
indices.
2017-11-28 16:39:20,455 ERROR Failed to complete action: delete_indices. <c
lass 'elasticsearch.exceptions.NotFoundError'>: TransportError(404, 'index_not_f
ound_exception', 'no such index')

```

But if I change hosts in curator.yml and provide one host at a time , it run successfully with following output-  
(1).when hosts:

- 192.168.101.188

```auto
2017-11-28 16:40:07,715 INFO Preparing Action ID: 1, "delete_indices"
2017-11-28 16:40:07,755 INFO Trying Action ID: 1, "delete_indices": Delete
indices.
2017-11-28 16:40:08,257 INFO DRY-RUN MODE. No changes will be made.
2017-11-28 16:40:08,258 INFO (CLOSED) indices may be shown that may not be
acted on by action "delete_indices".
2017-11-28 16:40:08,259 INFO DRY-RUN: delete_indices: logstash-2015.06.18 w
ith arguments: {}
2017-11-28 16:40:08,260 INFO DRY-RUN: delete_indices: logstash-2015.06.19 w
ith arguments: {}
2017-11-28 16:40:08,261 INFO DRY-RUN: delete_indices: logstash-2015.06.20 w
ith arguments: {}
2017-11-28 16:40:08,262 INFO Action ID: 1, "delete_indices" completed.
2017-11-28 16:40:08,262 INFO Job completed.

```

(2).when hosts:

- 192.168.10.136

```auto
2017-11-28 16:41:27,325 INFO Preparing Action ID: 1, "delete_indices"
2017-11-28 16:41:27,367 INFO Trying Action ID: 1, "delete_indices": Delete
indices.
2017-11-28 16:41:27,406 INFO DRY-RUN MODE. No changes will be made.
2017-11-28 16:41:27,407 INFO (CLOSED) indices may be shown that may not be
acted on by action "delete_indices".
2017-11-28 16:41:27,408 INFO DRY-RUN: delete_indices: logstash-2015.05.18 w
ith arguments: {}
2017-11-28 16:41:27,409 INFO DRY-RUN: delete_indices: logstash-2015.05.19 w
ith arguments: {}
2017-11-28 16:41:27,409 INFO DRY-RUN: delete_indices: logstash-2015.05.20 w
ith arguments: {}
2017-11-28 16:41:27,410 INFO Action ID: 1, "delete_indices" completed.
2017-11-28 16:41:27,411 INFO Job completed.

```

Any Luck?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 28, 2017, 5:35pm UTC](https://discuss.elastic.co/t/failed-to-delete-indices-when-curator-configured-for-multiple-hosts-in-same-cluster/109373/2 "2017-11-28T17:35:10Z")

</div>

(Redirected from [https://github.com/elastic/curator/issues/1110](https://github.com/elastic/curator/issues/1110))

How do you know they're connected and properly clustered? I'm convinced they are not clustered properly. Why?

When you run Curator against `192.168.101.188`, you see only indices which are named `logstash-2015.06.*`, and when you run Curator against `192.168.10.136`, you see only indices which are named `logstash-2015.05.*`. If they were clustered properly, you would see _all six indices_ when run against either or both IPs. Because you tried to round-robin them, that is exactly why you are getting the 404 error. It is behaving as though each host is a separate cluster.

These nodes are not behaving as though they are in the same cluster, but individual nodes in separate clusters.

---

<div class="post-metadata">

**Author:** ![Shivanshu\_Bagga](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Shivanshu\_Bagga](https://discuss.elastic.co/u/Shivanshu_Bagga)\
**Post date:** [November 30, 2017, 9:28am UTC](https://discuss.elastic.co/t/failed-to-delete-indices-when-curator-configured-for-multiple-hosts-in-same-cluster/109373/3 "2017-11-30T09:28:42Z")

</div>

Thanks ,

Yes there was problem in clustering .

Thanks

---

<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:** [December 28, 2017, 9:28am UTC](https://discuss.elastic.co/t/failed-to-delete-indices-when-curator-configured-for-multiple-hosts-in-same-cluster/109373/4 "2017-12-28T09:28:53Z")

</div>

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