기은P
시간이 멈추는 장소
기은P
  • Programming (272)
    • 개발노트 (1)
    • FrontEnd (56)
      • ES&JS 문법 (14)
      • HTML&CSS (4)
      • React 기본 (18)
      • React 심화 (12)
      • React 이슈 (2)
      • Project 연습 (1)
      • Next.js (5)
    • Backend&Devops (33)
      • AWS (2)
      • Docker (9)
      • Jenkins (6)
      • Nginx (6)
      • Node.js (1)
      • ElasticSearch (5)
      • 프레임워크&아키텍처 (2)
      • 암호화 (0)
      • 기타 (2)
    • 알고리즘 (3)
    • C# (8)
      • WPF (8)
    • Java (51)
      • 순수 Java (18)
      • RDF&Jena (12)
      • RCP&GEF (9)
      • JMX (5)
      • JMapper (3)
      • 오류해결 (4)
    • Database (21)
      • RDBMS (9)
      • NoSQL (2)
      • TSDB (1)
      • GraphQL (1)
      • Hibernate (3)
      • 데이터베이스 이론 (4)
      • Redis (1)
    • 프로토콜 (11)
      • Netty (4)
      • gRPC (5)
      • 프로토콜 개념 (2)
    • Server (4)
      • Linux (4)
    • 2020 정보처리기사 필기 (43)
      • 목차 (1)
      • 기출문제 (1)
      • 1과목 - 소프트웨어 설계 (6)
      • 2과목 - 소프트웨어 개발 (7)
      • 3과목 - 데이터베이스 구축 (8)
      • 4과목 - 프로그래밍 언어 활용 (7)
      • 5과목 - 정보시스템 구축 관리 (10)
    • 2020 정보처리기사 실기 (31)
      • 목차 (4)
      • 기출예상문제 (19)
      • 실기요약 (8)
    • 빅데이터분석기사 필기 (4)
      • 목차 (0)
      • 필기 요약 (3)
    • 전기 공학 (1)
      • CIM (1)
    • 산업자동화시스템 (3)
      • SCADA (1)
      • OPC UA (2)
    • 디자인패턴 (1)
    • 휴지통 (0)

공지사항

  • 공지사항/포스팅 예정 항목

최근 댓글

최근 글

전체 방문자
오늘
어제

티스토리

hELLO · Designed By 정상우.
기은P

시간이 멈추는 장소

[ElasticSearch] received plaintext http traffic on an https channel, closing connection 에러
Backend&Devops/ElasticSearch

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

2022. 7. 14. 09:35
반응형

1. 개요

윈도우 환경에서 ElasticSearch를 설치하고 localhost:9200으로 열어보았을때,

received plaintext http traffic on an https channel, closing connection

라는 오류가 발생하고 연결이 되지 않는 이슈가 있었습니다.

 

 

2. 해결 방법

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

...


# 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: ["DESKTOP-4GLM324"]

# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0



...

- xpack.security.enabled: false

- xpack.security.enrollment.enabled: false

- xpack.security.http.ssl:
  enabled: false

- xpack.security.transport.ssl:
  enabled: false

 

저 설정 파일에 들어가서 총 4개의 옵션을 true-> false로 변경해주시면 됩니다.

elasticsearch를 사용할 때 https를 통해서 ssl 인증서가 필요하게 되는데, 이 인증서에 대한 작업이 선행되지 않아 보안적인 이슈가 발생하는 것으로 확인됩니다.

 

local에서 테스트 할 때는 저 옵션만 false로 바꿔서 테스트를 진행하고, 실제 운영할 때는 ssl을 적용하는 방향으로 해결을 하는 것이 좋을 것 같습니다.

 

후에 http://localhost:9200 로 접속하면 아래와 같이 연결 된 것을 확인할 수 있습니다!

 

반응형
저작자표시 변경금지 (새창열림)

'Backend&Devops > ElasticSearch' 카테고리의 다른 글

[ElasticSearch] Logstash No configuration found in the configured sources. [에러해결]  (0) 2022.08.02
[ElasticSearch] logstash + mysql window 환경 연동  (0) 2022.07.19
[ElasticSearch] Insert(생성), Search(조회) 기본적인 CRUD  (0) 2022.07.18
[Elasticsearch] The bulk request must be terminated by a newline [\\n] 에러  (0) 2022.07.18
    'Backend&Devops/ElasticSearch' 카테고리의 다른 글
    • [ElasticSearch] Logstash No configuration found in the configured sources. [에러해결]
    • [ElasticSearch] logstash + mysql window 환경 연동
    • [ElasticSearch] Insert(생성), Search(조회) 기본적인 CRUD
    • [Elasticsearch] The bulk request must be terminated by a newline [\\n] 에러
    기은P
    기은P
    기은P의 블로그 일상과 개발 관련 포스팅 #React #Typescript #Next #Nest https://github.com/kimdongjang

    티스토리툴바