TLS error caused by: SSLError(hostname 'my_ip' doesn't match either of 'FE80:0:0:0:E062:44FF:FEA0:4B20', 'platform',

I'm new to Elasticsearch. I followed the official documentation to install and start a single-node Elasticsearch service. The service automatically enabled security features and generated a CA certificate for me, which is located in the config/cert directory. Then, on my local machine, I was able to successfully connect using:

es_client = Elasticsearch("https://127.0.0.1:9200", basic_auth=('elastic', '***********'), verify_certs=True, ca_certs='path/elasticsearch-8.11.0/config/certs/http_ca.crt')

However, when I downloaded the http_ca.crt certificate to my Mac and tried to connect using:

es_client = Elasticsearch("https://my server ip:9200", basic_auth=('elastic', '******'),verify_certs=True, ca_certs='./http_ca.crt')

I encountered an error:

TLS error caused by: TlsError(TLS error caused by: SSLError(hostname 'my server ip' doesn't match either of 'FE80:0:0:0:E062:44FF:FEA0:4B20', 'platform', 'FE80:0:0:0:24D1:66FF:FE8F:19', 'localhost', '10.203.0.64', 'FE80:0:0:0:4C14:B9FF:FE56:E593', '10.204.0.64', '10.206.0.65', '0:0:0:0:0:0:0:1', '127.0.0.1', '10.205.0.65', 'FE80:0:0:0:88E2:D8FF:FE39:AFB0', '10.201.202.75', 'FE80:0:0:0:34F7:C1FF:FE05:5531'))

What should I do to resolve this?"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.