ElasticSearch를 설치하고 확인을 위해 curl 명령어를 실행했을 때 다음과 같은 에러가 발생했다.
> curl -u elastic -XGET https://localhost:9200
Enter host password for user 'elastic':
curl: (60) SSL certificate problem: self-signed certificate in certificate chain
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
간단하게 자체 서명된 인증서에 대해서 신뢰할 수 없기에 연결할 수 없다는 에러였다.
이를 막기 위해서 -k 옵션을 사용해서 SSL 인증서 검증없이 연결하도록 명령해야 한다.
> curl -k -u elastic -XGET https://localhost:9200/
Enter host password for user 'elastic':
{
"name" : "kdelphinus-Laptop",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "Z_PdWK5wRKa1cJKBWnj27w",
"version" : {
"number" : "8.12.1",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "6185ba65d27469afabc9bc951cded6c17c21e3f3",
"build_date" : "2024-02-01T13:07:13.727175297Z",
"build_snapshot" : false,
"lucene_version" : "9.9.2",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}