After installing Elasticsearch 8.2 in Ubuntu 22.04 I have one problem when I try to connect via curl.
❯ curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic:1iXGIbPASSWORDQLp6+rv https://localhost:9200
curl: (77) error setting certificate file: /etc/elasticsearch/certs/http_ca.crt
I've verified certs installed by apt.
root@abkrim-nox:~# ls -lisah /etc/elasticsearch/certs/
total 32K
32251211 4,0K drwxr-x--- 2 root elasticsearch 4,0K may 20 20:07 .
32250781 4,0K drwxr-s--- 4 root elasticsearch 4,0K may 20 20:44 ..
32251212 4,0K -rw-rw---- 1 root elasticsearch 1,9K may 20 20:07 http_ca.crt
32251215 12K -rw-rw---- 1 root elasticsearch 9,9K may 20 20:07 http.p12
32251214 8,0K -rw-rw---- 1 root elasticsearch 5,7K may 20 20:07 transport.p12
After see this, I tried (and It0s works)
❯ sudo curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic:1iXGIbGHCFcknQLp6+rv https://localhost:9200
{
"name" : "abkrim-nox",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "E_d31aTxSaKlUIIQhOKZkw",
"version" : {
"number" : "8.2.0",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "b174af62e8dd9f4ac4d25875e9381ffe2b9282c5",
"build_date" : "2022-04-20T10:35:10.180408517Z",
"build_snapshot" : false,
"lucene_version" : "9.1.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}
I think is an issue with permission of deployed certificates by post script install of a deb package.
What is the way to correct this?