ssl verification fails despite verify_certs=false
See original GitHub issueIn elasticsearch version 6.6.1 and elasticsearch-dsl version 6.1.0, ssl verification seems to ignore the verify_certs option. When set to True, the cert is still verified and fails on self-signed certs.
In version elasticsearch 5.5.1, and elasticsearch-dsl version 5.4.0, the verify_certs options works as expected.
client = Elasticsearch( hosts=['localhost'], verify_certs=False, timeout=60 )
elasticsearch.exceptions.SSLError: ConnectionError([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)) caused by: SSLError([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777))
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:26 (8 by maintainers)
Top Results From Across the Web
python - urllib and "SSL: CERTIFICATE_VERIFY_FAILED" Error
There is nothing wrong with the URL and it can be successfully verified with the common trusted certificates. So you should better not...
Read more >A Simple Explanation of SSL Certificate Errors & How to Fix ...
1. SSL Certificate Not Trusted Error. This error indicates that the SSL certificate is signed or approved by a company that the browser...
Read more >What is an SSL 'Certificate_Verify_Failed' Error and How Do I ...
SSL certificate_verify_failed errors typically occur as a result of outdated Python default certificates or invalid root certificates. If you're a website owner ...
Read more >Ruby SSL Error: certificate verify failed - EngineYard
Summary. The Ruby OpenSSL error certificate verify failed means your code can't verify that the SSL certificate of the website or API you're ......
Read more >Unable to verify server's identity: [SSL - Red Hat Customer Portal
Oh I was using redhat 7.3 not Centos, even though I added the option its giving the same error. "Unable to verify server's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I went through the debugger a bunch and found that
verify_certs
is ignored ifca_certs
isNone
or set to some value (None
is taken as “use defaults”, which results in certs being set to required). Simply set this to aFalse
value of some sort that isn’tNone
and it should work.This seems to be an issue with the underlying Python library, but it’s difficult to figure that out due to the way keyword args are passed around in the Elasticsearch library.
@gnarlyman thanks for the issue and the good eye. I’ll get this fixed asap.
But please note that the use of
verify_certs
is depreicated.Please try creating an ssl_context object and set the verification mode on the context.