본문 바로가기
메모./ElasticSearch

curl: (52) Empty reply from server #ElasticSearch 8.3.3

by 낭람._. 2022. 8. 6.
반응형

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}

 

https://stackoverflow.com/questions/71492404/elasticsearch-showing-received-plaintext-http-traffic-on-an-https-channel-in-con

 

Elasticsearch showing received plaintext http traffic on an https channel in console

I am trying to setup elasticsearch in my Windows system but when I am trying to run it its starting up and showing below reponse when I redirect to http://localhost:9200. { "name" : "

stackoverflow.com

 

해당 에러는 접속 할 때 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"
}

 

성공.

반응형

댓글