Curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate

Dear All,

currently I have 2 clusters, I want to move data from cluster A to cluster B using the "reindex remote cluster" method. but it happens when running.

and when running curl on the local server and trying to access the remote cluster the results are as below.

[root@loc-master1 ca]# curl --cacert /etc/elasticsearch/certs/ca.crt -u elastic 'https://192.168.12.156:9200/_cat/nodes?v'
Enter host password for user 'elastic':
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.

can someone help me solve this problem? I am very confused.

Best Regards,
Septia

Hi @Septianingrum.17

Run that command again with -v and share the output. Pretty sure you have a missmatch in the certs SANs / IPs.

Please show the command in the full output