728x90
반응형
SonarQube(소나큐브)를 설치 후 구동시 시스템 설정에 따라서 구동이 되지 않고 아래와 같은 vm.max_map_count 관련 Error(에러)를 발생하는 경우가 있다.
해당 경우는 vm.max_map_count의 설정값이 어플리케이션에서 필요로 하는 수보다 작음에 따라서 발생하는 경우이다.
$ ./sonar.sh console
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2020.06.29 09:09:36 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /data/program/sonarqube-8.3.1.34397/temp
jvm 1 | 2020.06.29 09:09:36 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2020.06.29 09:09:37 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/data/program/sonarqube-8.3.1.34397/elasticsearch]: /data/program/sonarqube-8.3.1.34397/elasticsearch/bin/elasticsearch
jvm 1 | 2020.06.29 09:09:37 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1 | 2020.06.29 09:09:37 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2020.06.29 09:09:37 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | ERROR: [1] bootstrap checks failed
jvm 1 | [1]: max virtual memory areas vm.max_map_count [65536] is too low, increase to at least [262144]
jvm 1 | 2020.06.29 09:09:51 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
jvm 1 | 2020.06.29 09:09:51 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1 | 2020.06.29 09:09:51 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | <-- Wrapper Stopped
max_map_count프로세스가 사용할 수 있는 메모리 맵 영역의 최대 수를 지정합니다. 대부분의 경우 기본값으로 65530이 적절합니다. 애플리케이션에 이 파일 보다 많은 수를 매핑해야 하는 경우 이 값을 늘립니다.
참고 URL : https://access.redhat.com/documentation/ko-kr/red_hat_enterprise_linux/6/html/performance_tuning_guide/s-memory-captun
이제 해당 vm.max_map_count에 설정된 값 변경을 통해서 현재 Error를 해결 해보도록 하자.
1. 시스템 vm.max_map_count 설정 값 확인
- $ sysctl -a | grep vm.max_map_count
# vm.max_map_count 설정값 확인
$ sysctl -a | grep vm.max_map_count
vm.max_map_count = 65536
2. 시스템 vm.max_map_count 설정 값 변경
- $ sysctl -w vm.max_map_count=262144
# vm.max_map_count 설정값 변경
$ sysctl -w vm.max_map_count=262144
vm.max_map_count = 262144
# vm.max_map_count 설정값 확인
$ sysctl -a | grep vm.max_map_count
vm.max_map_count = 262144
3. SonarQube 구동
$ ./sonar.sh console
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2020.06.29 22:31:24 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /data/programs/sonarqube-8.3.1.34397/temp
jvm 1 | 2020.06.29 22:31:25 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2020.06.29 22:31:25 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/data/programs/sonarqube-8.3.1.34397/elasticsearch]: /data/programs/sonarqube-8.3.1.34397/elasticsearch/bin/elasticsearch
jvm 1 | 2020.06.29 22:31:25 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1 | 2020.06.29 22:31:25 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2020.06.29 22:31:25 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2020.06.29 22:31:34 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2020.06.29 22:31:34 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/data/programs/sonarqube-8.3.1.34397]: /data/programs/jdk-11.0.7+10/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/data/programs/sonarqube-8.3.1.34397/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx4096m -Xms2048m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/data/programs/sonarqube-8.3.1.34397/lib/jdbc/postgresql/postgresql-42.2.11.jar org.sonar.server.app.WebServer /data/programs/sonarqube-8.3.1.34397/temp/sq-process5634989807462242406properties
jvm 1 | 2020.06.29 22:31:42 INFO app[][o.s.a.SchedulerImpl] Process[web] is up
jvm 1 | 2020.06.29 22:31:42 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from [/data/programs/sonarqube-8.3.1.34397]: /data/programs/jdk-11.0.7+10/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/data/programs/sonarqube-8.3.1.34397/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/data/programs/sonarqube-8.3.1.34397/lib/jdbc/postgresql/postgresql-42.2.11.jar org.sonar.ce.app.CeServer /data/programs/sonarqube-8.3.1.34397/temp/sq-process16916391032304193146properties
jvm 1 | 2020.06.29 22:31:45 INFO app[][o.s.a.SchedulerImpl] Process[ce] is up
jvm 1 | 2020.06.29 22:31:45 INFO app[][o.s.a.SchedulerImpl] SonarQube is up
참고로 vm.max_map_count Error의 경우 elastic 구동시에도 많이 발생하는 Error 이다.
+ 참고 URL
728x90
반응형
'+ Application > SonarQube' 카테고리의 다른 글
[SonarQube] SonarQube(소나큐브) Admin 패스워드 변경 방법 (0) | 2020.06.23 |
---|---|
[SonarQube] SonarQube(소나큐브) 설치 하기 (0) | 2020.06.23 |
댓글