SonarQube flood stage disk watermark [95%] exceeded on

    로컬 환경에서 SonarQube 실행했는데, 웹이 뜨기도 전에 바로 죽어버렸다.

     

    도대체 왜.. http://localhost:9000 접속도 못해보고 바로 실행창이 닫혀버렸다..ㅋ

    sonarqube-{sonarqube-version}\logs\es.log 확인하니까 다음과 같은 에러가 보인다.

    SonarQube flood stage disk watermark [95%] exceeded on
    

     

    구글링 해보니 다음과 같은 글을 발견했다.

    https://github.com/vanderby/SonarQube-AzureAppService/issues/40

     

    SonarQube flood stage disk watermark [95%] exceeded on · Issue #40 · vanderby/SonarQube-AzureAppService

    I am raising this issue here as it is specific to the way Azure App Service allocates disk space on the D drive and D:/home folder. I have not been able to work around this and there are 1 or 2 pos...

    github.com

     

    💡 The Elasticsearch index in SonarQube is set to a 95% disk threshold meaning that when used disk space is going to exceed 95% then Elasticsearch writes a warning in the es.log file and tries to write to another node. However there are no other nodes so the indexing enters an infinite loop.

    SonarQube의 Elasticsearch 인덱스는 95% 디스크 임계값으로 설정되어 있습니다. 즉, 사용된 디스크 공간이 95%를 초과하면 Elasticsearch는 es.log 파일에 경고를 작성하고 다른 노드에 쓰기를 시도합니다. 그러나 다른 노드가 없으므로 인덱싱이 무한 루프에 들어갑니다.

     

    확인해 보니까 로컬 디스크를 95% 사용했던 것 ^^.. 공간 확보해 주니까 정상적으로 올라온다.

     

    결론 : 로컬에서 SonarQube 돌리려면 로컬 디스크 공간을 넉넉하게 확보하자!


    SonarQube는 기본 검색 및 데이터 저장 엔진으로 Elasticsearch를 사용한다.

    그럼 왜..? Elasticsearch를 사용할까.....?

    도대체 왜..?

     

    Chat-GPT에 물어보았다.

    SonarQube는 Elasticsearch를 활용하여 SonarQube 데이터베이스에 저장된 코드 분석 결과, 문제, 메트릭 및 기타 데이터에 대한 효율적이고 빠른 검색 기능을 제공합니다.
    SonarQube는 Elasticsearch의 분산 특성을 활용하여 여러 노드에서 데이터 저장 및 검색을 처리할 수 있으므로 성능과 확장성이 향상됩니다.
    Elasticsearch는 SonarQube가 복잡한 검색을 수행하고 다양한 필터를 적용하여 특정 데이터를 검색할 수 있도록 유연한 쿼리 DSL(Domain-Specific Language)을 제공합니다.
    SonarQube는 코드 품질에 대한 실시간 피드백을 제공하기 위해 코드 저장소를 지속적으로 분석합니다. Elasticsearch의 인덱싱 기능은 코드 관련 데이터의 효율적이고 거의 실시간 인덱싱 및 분석을 가능하게 하여 SonarQube가 최신의 정확한 결과를 제공할 수 있도록 합니다.
    Elasticsearch는 집계를 지원하여 SonarQube가 계산을 수행하고 다양한 차원에서 코드 품질 지표에 대한 통계를 생성할 수 있도록 합니다. SonarQube는 Elasticsearch의 집계 기능을 사용하여 보고 및 분석 목적으로 차트, 그래프 및 시각화를 생성합니다.
    . SonarQube와 Elasticsearch의 통합은 Elasticsearch를 활용하는 다른 도구 및 시스템과의 원활한 통합을 가능하게 하여 더 큰 확장성과 상호 운용성을 허용합니다.

     

    Elasticsearch의 빠른 검색 + 분석 때문이었다! 어쩐지 소나큐브 쓸 때 다양한 검색 조건을 걸어도 엄청 빨리 조회되었는데, 이게 Elasticsearch 때문이었다니! 

    728x90

    댓글