From b627cb86c9279a4da9ae19f72f1f243ed986c581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B3=B5=EB=8C=80=EB=B2=A0=EC=A7=B1=EC=9D=B4?= Date: Mon, 9 Sep 2024 08:33:56 +0900 Subject: [PATCH] feat(posts): create 2024-09-09-sonarqube-start-error --- .../2024-09-09-sonarqube-start-error.md | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 _posts/staticanalysis/2024-09-09-sonarqube-start-error.md diff --git a/_posts/staticanalysis/2024-09-09-sonarqube-start-error.md b/_posts/staticanalysis/2024-09-09-sonarqube-start-error.md new file mode 100644 index 00000000000..211faf2a9a8 --- /dev/null +++ b/_posts/staticanalysis/2024-09-09-sonarqube-start-error.md @@ -0,0 +1,43 @@ +`--- +title: SonarQube vm.max_map_count 에러 +author: dejavuhyo +date: 2024-09-09 08:33:00 +0900 +categories: [DevOps, StaticAnalysis] +tags: [sonarqube-error, sonarqube-vm-error, vm-max_map_count, 소나큐브-에러, 소나큐브-vm-에러] +--- + +## 1. 에러 로그 +`vm.max_map_count`관련 에러가 발생하고 SonarQube가 구동되지 않는다. + +```text +ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch. +bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] +ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log +``` + +## 2. 원인 +Elasticsearch 구동시에 많이 발생하는 에러이며, SonarQube는 Elasticsearch를 사용하고 있다. + +`vm.max_map_count`의 설정값이 애플리케이션에서 필요로 하는 수보다 작아서 발생하는 오류이다. + +## 3. 해결방법 + +* vm.max_map_count 설정 확인 + +```shell +$ sudo sysctl -a | grep vm.max_map_count +vm.max_map_count = 65530 +``` + +* vm.max_map_count 변경 + +```shell +$ sudo sysctl -w vm.max_map_count = 262144 +vm.max_map_count = 262144 + +$ sudo sysctl -a | grep vm.max_map_count +vm.max_map_count = 262144 +``` + +## [출처 및 참고] +* [https://happylie.tistory.com/112](https://happylie.tistory.com/112)