elasticsearch python interlock

Viewed 22
ssl_context = create_ssl_context()
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE

es = Elasticsearch(hosts=[{'host': 'localhost', 'port': 9200}],
                   scheme="https",
                   # to ensure that it does not use the default value `True`
                   verify_certs=False,
                   ssl_context=ssl_context,
                   basic_auth=("elastic", "elastic"))
es = Elasticsearch("https://127.0.0.1t:9200", ca_certs=False, basic_auth=("elastic", "elastic"))
es = Elasticsearch("https://127.0.0.1t:9200", basic_auth=("elastic", "elastic"))

I tried in many ways. No way.

"elastic_transport.TlsError: TLS error caused by: TlsError(TLS error caused by: SSLError([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)))"

Environmental composition:
win10
elasticsearch-8.4.0
py3.10
pycharm

0 Answers
Related