问题:
File "/home/server/miniconda3/envs/rag/lib/python3.8/site-packages/elastic_transport/_transport.py", line 328, in perform_request
meta, raw_data = node.perform_request(
File "/home/server/miniconda3/envs/rag/lib/python3.8/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
raise err from None
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:1131)))
当前,ElasticVectorSearch
和 ElasticKNNSearch 为旧版 ,这里直接使用新版
ElasticsearchStore
修改前:
es_connection = ElasticsearchStore(
embedding=embedings_h,
index_name="hello-index",
es_url = "https://192.168.0.133:9200",
es_user = "elastic",
es_password = "cwr9De0nHWPT27QyJMf+",
distance_strategy = 'COSINE',
)
添加 es_params = {"ca_certs":False,"verify_certs" : False} 字段即可文章来源:https://www.toymoban.com/news/detail-802319.html
es_connection = ElasticsearchStore(
embedding=embedings_h,
index_name="hello-index",
es_url = "https://192.168.0.133:9200",
es_user = "elastic",
es_password = "cwr9De0nHWPT27QyJMf+",
distance_strategy = 'COSINE',
es_params = {"ca_certs":False,"verify_certs" : False},
)
当前为快速验证阶段,不想看警告信息,可添加到头部文章来源地址https://www.toymoban.com/news/detail-802319.html
import urllib3
urllib3.disable_warnings()
到了这里,关于Elasticsearch(实践2)链接库产生TLS验证安全性报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!