I am following the instructions in this tutorial -- Start a multi-node cluster with Docker:
I could access Elasticsearch by using this command "curl --cacert ca.crt -u elastic:rogerfan https://localhost:9200" with the ca.crt file under "/usr/share/elasticsearch/config/certs/ca/ca.crt" either from the docker container or the host.
However, when I changed the localhost to its actual IP 192.168.xxx.xxx, it shows:
[root@localhost ~]# curl --cacert certs/ca/ca.crt https://192.168.39.12:9200
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
I wonder if this is caused by the ca-certificates, I tried to find the location of http_ca.crt but just ca.crt was found... So I am not quite sure what is the reason and how can I resolve it.