ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • elasticsearch failed to flush export bulk [default_local]
    elasticsearch 2021. 5. 2. 17:35
    반응형

    우리 서버에 matrix를 설치한 뒤 보니 failed to flush export bulk 와 같은 에러가 나고 있었다

    물론 서비스 이슈는 없었지만 당연히 제거해야 될 에러였다

     

    [2021-04-29T23:27:04,206][WARN ][o.e.x.m.MonitoringService] [xxxx] monitoring execution failed
    org.elasticsearch.xpack.monitoring.exporter.ExportException: failed to flush export bulks
    	at org.elasticsearch.xpack.monitoring.exporter.ExportBulk$Compound.lambda$doFlush$0(ExportBulk.java:109) [x-pack-monitoring-7.5.0.jar:7.5.0]
    ...
    Caused by: org.elasticsearch.xpack.monitoring.exporter.ExportException: failed to flush export bulk [default_local]
    	... 37 more
    Caused by: java.lang.IllegalStateException: There are no ingest nodes in this cluster, unable to forward request to an ingest node.
    	at org.elasticsearch.action.ingest.IngestActionForwarder.randomIngestNode(IngestActionForwarder.java:58) ~[elasticsearch-7.5.0.jar:7.5.0]

     

    만약 matrix를 사용하지 않는다면 xpack.monitoring.collection.enabled: false 로 설정하면 에러는 해결 될 것이다

     

    그러나 우리는 xpack.monitoring.collection.enabled: true로 사용해야 하기 때문에 위와 같이 해결 할 수는 없고 아래와 같이 2가지 방법이 있었다

     

    1.

    node.ingest: true 
    
    

    2.

    xpack.monitoring.exporters.my_local:
      type: local
      use_ingest: false

    하지만 ingest는 사용하지 않고 있기 때문에 우리는 2번을 선택해서 수정하였다

     

    그런데 위와 같지 않은 상황에서도 해당 에러가 발생하는 경우가 있다

    elasticsearch는 log, data file을 만들어서 사용하게 된다 elasticsearch.yaml을 보면 data 파일이 그 위치다

    검색엔진 버전을 A -> B로 변경했을 때 log, data file이 남아있는 상태에서 새로운 버전의 es가 만들어지고 cluster 가 생기고 그 파일을 공유하게 되는데 그로 인해 문제가 발생한다 

    그래서 log, data file을 날려주면 문제가 해결된다

    반응형

    댓글

Designed by Tistory.