ElasticSearch received plaintext http traffic on an http channel, closing connection 에러

2024. 1. 23. 18:56IT

윈도우 환경에서 

elasticsearch를 설치하고,

127.0.0.1:9200으로 접속한 경우에 에러발생.

접속되지 않음

 

 

해결방법

[elasticserach설치폴더]/config/elasticsearch.yml

수정 

xpack.security.enabled: true
xpack.security.enrollment.enabled: true

xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12

 

 

위 true를 false로 변경

 

 

xpack.security.enabled: false
xpack.security.enrollment.enabled: false

xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

xpack.security.transport.ssl:
  enabled: false
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12

 

 

https 를 통해서 ssl인증서가 필요한데, 인증서가 없어 보안 이슈 발생

local테스트 때는 false로 진행하고, 

실제 운영서버에는 ssl적용 필요

 

변경후, elasticsearch 재실행하고,

127.0.0.1:9200 접속하면 아래와 같은 결과 확인 가능

 

반응형