반응형
Elasticsearch를 윈도우에서 다운로드하고, ElasticSearch 8.3.3을 실행시켰다.
그 후 curl 명령을 날리면 다음과 같은 에러가 나타난다.
>curl http://localhost:9200
curl: (52) Empty reply from server
[@timestamp][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [USER] received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/127.0.0.1:9200, remoteAddress=/127.0.0.1:59661}
해당 에러는 접속 할 때 HTTP를 사용해서 그렇다.
버전 8부터 SSL/TLS가 기본적으로 설정 되어 있다.
해결 방법은 elasticsearch.yml의 SSL 설정을 true에서 false로 수정해야 한다.
# Enable security features
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: false
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["USER"]
* 설정 변경없이 접속 하고 싶다면 ? curl: (60) schannel: SEC_E_UNTREUSTED_ROOT
저장 후 다시 curl 명령어를 날려보자.
>curl localhost:9200
{
"name" : "USER",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "yfYvR95lQeO2wiZZhuQCcQ",
"version" : {
"number" : "8.3.3",
"build_flavor" : "default",
"build_type" : "zip",
"build_hash" : "801fed82df74dbe537f89b71b098ccaff88d2c56",
"build_date" : "2022-07-23T19:30:09.227964828Z",
"build_snapshot" : false,
"lucene_version" : "9.2.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}
성공.
반응형
'메모. > ElasticSearch' 카테고리의 다른 글
Content-Type header [application... #ElasticSearch 8.3.3 (0) | 2022.08.09 |
---|---|
curl: (6) Could not resolve host: application #ElasticSearch 8.3.3 (0) | 2022.08.08 |
curl: (60) schannel: SEC_E_UNTRUSTED_ROOT #ElasticSearch 8.3.3 (2) | 2022.08.07 |
댓글