Hello I am learning Elasticstack, greate tools!
Are there any good way to use “curator” to delete old data
on Elasticstack 6.2.4.
- Whats happens
I Install Elasticstack 6.2.4 with apt-get on Debian 9, work well!
Then “apt-get install elasticsearch-curator“ and
try to delete old data.
curator --dry-run ~/.curator/action.yml
curator ~/.curator/action.yml
But I got error as followings, similar to #1089, #1186 at GitHub-elastic/curator.
- error
curator --dry-run ~/.curator/action.yml
2018-04-30 18:51:39,331 INFO Preparing Action ID: 1, "delete_indices"
Traceback (most recent call last):
File "/usr/bin/curator", line 11, in
load_entry_point('elasticsearch-curator==4.2.5', 'console_scripts', 'curator')()
File "/usr/lib/python2.7/dist-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/curator/cli.py", line 166, in cli
client = get_client(**client_args)
File "/usr/lib/python2.7/dist-packages/curator/utils.py", line 603, in get_client
'Error: {0}'.format(e)
elasticsearch.exceptions.ElasticsearchException: Unable to create client connection to Elasticsearch. Error: Elasticsearch version 6.2.4 incompatible with this version of Curator (6.2.4)
I read following article, etc.
- Wrong version number in incompatibility exception
- Error: Elasticsearch version 6.1.2 incompatible with this version of Curator (6.1.2)
Then, replace "/usr/lib/python2.7/dist-packages/curator/utils.py" to
“https://github.com/elastic/curator/blob/master/curator/utils.py",
but got similar error.
- error
curator --dry-run ~/.curator/action.yml
2018-04-30 18:54:12,705 INFO Preparing Action ID: 1, "delete_indices"
2018-04-30 18:54:12,712 ERROR Elasticsearch version 6.2.4 incompatible with this version of Curator (4.2.5)
Traceback (most recent call last):
File "/usr/bin/curator", line 11, in
load_entry_point('elasticsearch-curator==4.2.5', 'console_scripts', 'curator')()
File "/usr/lib/python2.7/dist-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/curator/cli.py", line 166, in cli
client = get_client(**client_args)
File "/usr/lib/python2.7/dist-packages/curator/utils.py", line 901, in get_client
'Error: {0}'.format(e)
elasticsearch.exceptions.ElasticsearchException: Unable to create client connection to Elasticsearch. Error: Elasticsearch version 6.2.4 incompatible with this version of Curator (4.2.5)
Though, I am not good at programming, I comment out in
“utils.py” like this, and “curator“ work OK for now.
/usr/lib/python2.7/dist-packages/curator/utils.py
691 #if version_number >= settings.version_max() \ 692 # or version_number < settings.version_min(): 693 # logger.error( 694 # 'Elasticsearch version {0} incompatible ' 695 # 'with this version of Curator ' 696 # '({1})'.format(".".join(map(str,version_number)), __version__) 697 # ) 698 # raise CuratorException( 699 # 'Elasticsearch version {0} incompatible ' 700 # 'with this version of Curator ' 701 # '({1})'.format(".".join(map(str,version_number)), __version__) 702 # )
Are there any good way to use “curator” to delete old data
on Elasticstack 6.2.4?, thank you.
PS.
This dose not happen on Elastic Stack 5.0.2.