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

Here is my curator.yml configuration-

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 -

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.-

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
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
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?

(Redirected from 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.

Thanks ,

Yes there was problem in clustering .

Thanks

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