Thanks aaron for that. I got everything worked out now. The only thing that I have hard time is using certificate file for ssl authentication. Attached is my config file. It gives me authentication error. Just to add , It works perfectly fine if I change the ssl_no_validate to true.
But I get this following error :
/usr/local/lib/python2.7/dist-packages/curator/utils.py:53: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
return yaml.load(read_file(path))
Traceback (most recent call last):
File "/usr/local/bin/curator", line 11, in
sys.exit(cli())
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 213, in cli
run(config, action_file, dry_run)
File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 160, in run
client = get_client(**client_args)
File "/usr/local/lib/python2.7/dist-packages/curator/utils.py", line 906, in get_client
'Error: {0}'.format(e)
elasticsearch.exceptions.ElasticsearchException: Unable to create client connection to Elasticsearch. Error: ConnectionError(hostname u'112.16.116.185' doesn't match either of 'elasticsearch1', '112.16.116.185') caused by: SSLError(hostname u'112.16.116.185' doesn't match either of 'elasticsearch1', '112.16.116.185')
What did you use to generate those certificates? It appears you are doing full hostname validation, as it's checking for elasticsearch1 or the IP. Is the remote Elasticsearch configured to expect full verification for ssl.verification_mode? I recommend using certificate for these self-signed ones, or you should probably build them with fully-qualified domain names, instead of just IPs and short host names.
Apparently, your certificate only has 'elasticsearch1', and '112.16.116.185' associated with it. You specified this when you created the certificates. Elasticsearch is trying to verify these values, and it's not able to do so. I recommend setting
xpack.ssl.verification_mode: certificate
…in your elasticsearch.yml file so that the certificate Curator is using only has to be signed by the same certificate authority that created the ones you made for your Elasticsearch nodes.
If you can't, I recommend creating new certificates that are based not on short name and IP, but on a fully-qualified domain name, and making an extra one for Curator, if needed. If Curator is running on one of your existing hosts, you can re-use its certificate.
You could also try to just put elasticsearch1 in your hosts array in the Curator YAML file, but FQDN is better.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.