Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Root certificates are missing for certificate validation. Either pass them in using the ca_certs parameter or install certifi to use it automatically

I am using django-elasticsearch-dsl in one of our projects, and after creating a cluster in AWS Elasticsearch, I started seeing this error: Root certificates are missing for certificate validation. Either pass them in using the ca_certs parameter or install certifi to use it automatically.. There are some solutions proposed to solve the issue for https://elasticsearch-py.readthedocs.io in this linke [link][1], but that is not for django-elasticsearch-dsl which is using elasticsearch-py. I only can set the endpoint through the settings.py like this:

ELASTICSEARCH_DSL = {
    'default': {
        'hosts': 'https://my-aws-elasticsearch-endpoint.eu-central-1.es.amazonaws.com'
    }
}

How can I add/enable this certificate for django-elasticsearch-dsl

like image 712
anyavacy Avatar asked Jul 12 '18 08:07

anyavacy


1 Answers

pip install certifi should do the trick, as the message suggests. elasticsearch-py will automatically look it up.

like image 151
Honza Král Avatar answered Sep 28 '22 09:09

Honza Král