benthos

[benthos] Elasticserach 연결 실패 문제(해결 안됨)

justbagmeg 2022. 7. 10. 18:57

환경

도커 이미지:

    elasticsearch:8.3.2, elasticsearch:7.10.0

    jeffail/benthos:latest(2022-06-23일자), jeffail/benthos:4.0.0

호스트 환경: MacOS Monterey

 

문제

benthos에서 output을 elasticsearch를 사용할 경우 발생하는 문제

 

코드, HTTP API request

input:
  label: ""
  http_server:
    address: ""
    timeout: 5s

pipeline:
  processors:
  - bloblang: |
      article = article

output:
  label: ""
  elasticsearch:
    urls:
    - "http://localhost:9200/"
    index: "movies"
    id: ${!count("elastic_ids")}-${!timestamp_unix()}
    type: ""
    max_in_flight: 64
    sniff: false
curl -XPOST http://localhost:4195/post -d '{"type": "article","article": {"id": "123foo","title": "Dope article","content": "this is a totally dope article"},"user": {"id": "user1"}}'

curl로 요청을 보냈을 경우 발생.

 


benthos:4.0.0가 elastic go pkg 7버전을 사용하고 있어서 elasticsearch:7.10.0으로 해봤지만 같은 증상 발생.

 https://pkg.go.dev/github.com/olivere/elastic/v7#section-readme

 

https://github.com/benthosdev/benthos/issues/892

benthos issue 중에 비슷한 문제. 

'benthos' 카테고리의 다른 글

[benthos] docker로 시작하기  (0) 2022.07.09