Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talarczykco/b9511bc13cf34dd60127f56baf6b943b to your computer and use it in GitHub Desktop.
Save talarczykco/b9511bc13cf34dd60127f56baf6b943b to your computer and use it in GitHub Desktop.
elasticsearch.exceptions.ElasticsearchException: Unable to create client connection to Elasticsearch. Error: Root certificates are missing for certificate validation. Either pass them in using the ca_certs parameter or install certifi to use it automatically

If you use elasticsearch-curator on AWS (or possibly other hosted or self-hosted Elasticsearch installations that use SSL,) and you get this when curating:

elasticsearch.exceptions.ElasticsearchException: Unable to create client connection to Elasticsearch. Error: Root certificates are missing for certificate validation. Either pass them in using the ca_certs parameter or install certifi to use it automatically.

Then make sure the client.use_ssl key is present and True. This is a non-obvious error that led me down a rathole of Googling. Don't bother specifying root certificates, or installing certifi (it's probably already installed, if you installed elasticsearch-curator with pip.)

---
# https://www.elastic.co/guide/en/elasticsearch/client/curator/current/configfile.html
client:
  hosts:
    - https://your.elastic.endpoint
  port: 443
  use_ssl: True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment