Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(posts): create 2024-09-09-sonarqube-start-error #527

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions _posts/staticanalysis/2024-09-09-sonarqube-start-error.md
Original file line number Diff line number Diff line change
@@ -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)