# Can I use Curator 4.2.4 with ElasticSearch 2.x

**URL:** https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816
**Category:** Elasticsearch
**Created:** [December 13, 2016, 6:01am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816 "2016-12-13T06:01:21Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Srinivas\_Mangipudi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Srinivas\_Mangipudi](https://discuss.elastic.co/u/Srinivas_Mangipudi)
#### Post date: [December 13, 2016, 6:01am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/1 "2016-12-13T06:01:21Z")

</div>

We are using ElasticSearch 2.x on AWS EC2 instance. This is the latest version they have available and we are not getting any response to if they will ever upgrade it to the latest version.

So we need to use curator on our job server to organise time-series data and drop older indices. My question is can we use the latest version of curator 4.2.4 with ElasticSearch 2.x ?

Or do we need to use some specific version?

---

<div class="post-metadata">

### Author: ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)
#### Post date: [December 13, 2016, 6:07am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/2 "2016-12-13T06:07:36Z")

</div>

> [@Srinivas\_Mangipudi](#):
>
> My question is can we use the latest version of curator 4.2.4 with Elasticsearch 2.x ?

I think yes, I'm using Curator 4.x on Elasticsearch 2.x now.

---

<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: [December 13, 2016, 8:49am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/3 "2016-12-13T08:49:34Z")

</div>

Yes. See the [compatibility matrix](https://github.com/elastic/curator).

---

<div class="post-metadata">

### Author: ![Srinivas\_Mangipudi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Srinivas\_Mangipudi](https://discuss.elastic.co/u/Srinivas_Mangipudi)
#### Post date: [December 14, 2016, 7:51am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/4 "2016-12-14T07:51:26Z")

</div>

Hi,

So while create index works on curator4.2.4, create alias command does not work. It fails with authentication Exception below.

Failed to complete action: alias. \<class 'elasticsearch.exceptions.AuthenticationException'\>: TransportError(401, u'{"Message":"Your request: '/\_cluster/state/metadata/.kibana,.kibana-4,browntape,bt\_companies\_1,bt\_company\_day\_counts\_1,bt\_orders\_1,bt\_queue\_results1,bt\_sku\_day\_closing\_stock1,bt\_skus\_1,command.php,queue\_pings1' is not allowed."}')

So I tested using curator 3.5 and create alias works there. Why is this so? If there is a problem with accessing cluster metadata, it should be problematic for both versions of curator isn't it?

---

<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: [December 14, 2016, 8:07am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/5 "2016-12-14T08:07:06Z")

</div>

The 401 error is from Elasticsearch. I'm not sure what's different between your environments, but it's Elasticsearch that's rejecting the action, rather than a Curator compatibility issue.

Also, that is a GET request, not a POST/PUT as the \_cluster/state endpoint is for reading, not writing. Something there seems off.

---

<div class="post-metadata">

### Author: ![Srinivas\_Mangipudi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Srinivas\_Mangipudi](https://discuss.elastic.co/u/Srinivas_Mangipudi)
#### Post date: [December 14, 2016, 8:55am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/6 "2016-12-14T08:55:46Z")

</div>

I am just using the actions as specified in the actionfile. Here is the action which tries to create a alias using the filter:

2:  
action: alias  
description: detach save alias from old index  
options:  
name: queue\_pings\_save  
extra\_settings:  
timeout\_override:  
continue\_if\_exception: True  
disable\_action: False  
remove:  
filters:  
- filtertype: pattern  
kind: prefix  
value: queue\_pings\_new  
3:  
action: alias  
description: attach alias to the newly created index  
options:  
name: queue\_pings  
extra\_settings:  
timeout\_override:  
continue\_if\_exception: False  
disable\_action: False  
add:  
filters:  
- filtertype: pattern  
kind: prefix  
value: queue\_pings\_new  
exclude:  
- filtertype: age  
source: creation\_date  
direction: younger  
timestring: '%Y.%m.%d'  
unit: seconds  
unit\_count: 60  
exclude:

both these are giving the authentication exception above mentioned. I guess in the second case curator is trying to read the creation\_date which is probably from the cluster metadata, and thus fails. But can't figure out why is it failing in the first case where source:creation\_date is not mentioned?

---

<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: [December 14, 2016, 9:28am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/7 "2016-12-14T09:28:53Z")

</div>

> [@Srinivas\_Mangipudi](#):
>
> I guess in the second case curator is trying to read the creation\_date

Curator _always_ tries to read the full metadata for all indices. Were any of these indices created before ES 1.4? There is no creation\_date in those older indices. Curator usually reports an error when it sees that condition, though.

---

<div class="post-metadata">

### Author: ![Srinivas\_Mangipudi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Srinivas\_Mangipudi](https://discuss.elastic.co/u/Srinivas_Mangipudi)
#### Post date: [December 14, 2016, 9:34am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/8 "2016-12-14T09:34:16Z")

</div>

Yes. But they were re-indexed when we migrated to AWS ES 2.x.

I just checked and the creation\_date is present in the index. Here is the detail below.

{  
"queue\_pings1" : {  
"aliases" : {  
"queue\_pings" : { }  
},  
"mappings" : {  
"QueuePings" : {  
"properties" : {  
"length" : {  
"type" : "integer"  
},  
"queue" : {  
"type" : "string"  
},  
"timestamp" : {  
"type" : "date",  
"ignore\_malformed" : true,  
"format" : "yyyy-MM-dd HH:mm:ss"  
}  
}  
}  
},  
"settings" : {  
"index" : {  
"creation\_date" : "1472027497662",  
"number\_of\_shards" : "5",  
"number\_of\_replicas" : "1",  
"uuid" : "HBAgyQswTxWRvvZdAqkjTg",  
"version" : {  
"created" : "2020199"  
},  
"blocks" : {  
"write" : "false"  
}  
}  
},  
"warmers" : { }  
}  
}

---

<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: [December 14, 2016, 9:52am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/9 "2016-12-14T09:52:10Z")

</div>

I would try that metadata call against each index individually, then, and try to figure out which one is causing the issue.

---

<div class="post-metadata">

### Author: ![Srinivas\_Mangipudi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Srinivas\_Mangipudi](https://discuss.elastic.co/u/Srinivas_Mangipudi)
#### Post date: [December 14, 2016, 10:04am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/10 "2016-12-14T10:04:34Z")

</div>

I just checked all the indices one by one, and all of them have the creation\_date. Also when I create an alias using a curl command, it works.

So not able to figure out why alias action is failing specifically from curator 4.2

---

<div class="post-metadata">

### Author: ![Srinivas\_Mangipudi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Srinivas\_Mangipudi](https://discuss.elastic.co/u/Srinivas_Mangipudi)
#### Post date: [December 14, 2016, 10:28am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/11 "2016-12-14T10:28:40Z")

</div>

Another thing I tested is to create a new instance of ElasticSearch with no indices or aliases on AWS and ran the same script. Still got the same error.

Failed to complete action: alias. \<class 'elasticsearch.exceptions.AuthenticationException'\>: TransportError(401, u'{"Message":"Your request: '/\_cluster/state/metadata/queue\_pings\_new\_201612501024' is not allowed."}')

So I am guessing there is some problem with the way curator is configured? Do I need to specify additional params?

Currently I am only providing host and port.

---

<div class="post-metadata">

### Author: ![Srinivas\_Mangipudi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Srinivas\_Mangipudi](https://discuss.elastic.co/u/Srinivas_Mangipudi)
#### Post date: [December 14, 2016, 10:37am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/12 "2016-12-14T10:37:18Z")

</div>

Hey Aaron,

We just created a vanilla instance of ElasticSearch 2.x,but still it does  
not allow creating aliases and also deleting indices. If you could just try  
from your end and see, if there is a config issue or something on my end,  
would be very helpful.

The ES instance is: search-test-ig2eytk3wyn6fnjv6asubd6r6e.us-eas  
[t-1.es.amazonaws.com](http://t-1.es.amazonaws.com)

Thanks.  
Srinivas

---

<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: [December 14, 2016, 10:55am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/13 "2016-12-14T10:55:09Z")

</div>

I recall reading somewhere that some of the API calls used by Curator at least used to be blocked in the AWS Elasticsearch service. @theuntergeek do you know if this is still the case?

---

<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: [December 14, 2016, 10:56am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/14 "2016-12-14T10:56:07Z")

</div>

Oh! You're using AWS Elasticsearch? That is not supported by Curator 4. See the [compatibility matrix](https://github.com/elastic/curator). That's why you'd see that message.

Also see [https://www.elastic.co/guide/en/elasticsearch/client/curator/current/faq\_aws\_iam.html](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/faq_aws_iam.html)

When you said

> [@Srinivas\_Mangipudi](#):
>
> Elasticsearch 2.x on AWS EC2 instance.

I thought you meant running your own on AWS, not using their version. They altered the core code, so that call doesn't work.

---

<div class="post-metadata">

### Author: ![Srinivas\_Mangipudi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Srinivas\_Mangipudi](https://discuss.elastic.co/u/Srinivas_Mangipudi)
#### Post date: [December 14, 2016, 11:09am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/15 "2016-12-14T11:09:31Z")

</div>

Thanks @theuntergeek. Yes sorry I meant we were using AWS ElasticSearch. Ok Anyways, now we know AWS needs to update soon!

---

<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: [January 11, 2017, 11:10am UTC](https://discuss.elastic.co/t/can-i-use-curator-4-2-4-with-elasticsearch-2-x/68816/16 "2017-01-11T11:10:08Z")

</div>

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