I’m setting SonarQube in my CentOS 7 following this tutorial: https://thegeeksalive.com/how-to-install-sonarqube-on-centos/
And finally I start my Sonar, but it cannot start because of memory problem here.
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2019.07.24 10:58:55 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2019.07.24 10:58:55 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.07.24 10:58:55 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2019.07.24 10:58:55 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2019.07.24 10:58:55 INFO app[][o.e.p.PluginsService] no modules loaded
2019.07.24 10:58:55 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2019.07.24 10:59:08 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2019.07.24 10:59:08 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/java/jdk-11.0.4/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp --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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/opt/sonarqube/lib/jdbc/mysql/mysql-connector-java-5.1.46.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process16556217505100103896properties
2019.07.24 10:59:12 INFO app[][o.s.a.SchedulerImpl] Process[web] is stopped
2019.07.24 10:59:12 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2019.07.24 10:59:12 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2019.07.24 10:59:12 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
Hope everyone help me find the solution. Thank you!
3
Answers
This error is most likely caused by the project being too big for SonarQube to scan with the default memory settings.
Try the following workarounds:
Check what’s in
logs/es.log
in your SonarQube home directory. Many issues with starting SonarQube on Linux show messages such asmax virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
If you see this, then you should run the following commands before starting SonarQube
I guess you are trying to use docker compose to start sonarqube service.
you can try with this.