Santosh Jagtap
Santosh Jagtap

Reputation: 1065

Sonarqube-7.9.1 HeapDumpOnOutOfMemoryError

I installed sonarqube-7.9.1 on my Ubuntu 18.04 machine. JAVA 11 is installed and Mysql used as database. Some important rows from sonar.properties are as follows

sonar.web.javaOpts=-Xmx1024m -Xms1024m -XX:+HeapDumpOnOutOfMemoryError
sonar.web.host=127.0.0.1
sonar.ce.javaOpts=-Xmx1024m -Xms1024m -XX:+HeapDumpOnOutOfMemoryError

Sonarqube log file shows following lines

Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2019.10.17 12:36:49 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/sonarqube-7.9.1/temp
2019.10.17 12:36:49 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.10.17 12:36:49 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/sonarqube-7.9.1/elasticsearch]: /opt/sonarqube/sonarqube-7.9.1/elasticsearch/bin/elasticsearch
2019.10.17 12:36:49 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2019.10.17 12:36:49 INFO  app[][o.e.p.PluginsService] no modules loaded
2019.10.17 12:36:49 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019.10.17 12:37:01 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2019.10.17 12:37:01 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube/sonarqube-7.9.1]: /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/sonarqube-7.9.1/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 -Xmx1024m -Xms1024m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/opt/sonarqube/sonarqube-7.9.1/lib/jdbc/mysql/mysql-connector-java-5.1.46.jar org.sonar.server.app.WebServer /opt/sonarqube/sonarqube-7.9.1/temp/sq-process4977560398960418438properties
2019.10.17 12:37:04 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2019.10.17 12:37:05 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2019.10.17 12:37:05 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2019.10.17 12:37:05 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

Upvotes: 2

Views: 5502

Answers (2)

Ashutosh Shukla
Ashutosh Shukla

Reputation: 555

I was also getting the same issue of starting Sonarqube-7.9.1 with OpenJDK-11 because of the port conflicts. I tried changing port numbers and issue got resolved. Try replacing below lines in sonar.properties:

sonar.web.port=9004

sonar.search.port=9005

we can replace below lines also,already given in this question at the start [For me it worked without replacing below lines]:

sonar.web.javaOpts=-Xmx1024m -Xms1024m -XX:+HeapDumpOnOutOfMemoryError

sonar.ce.javaOpts=-Xmx1024m -Xms1024m -XX:+HeapDumpOnOutOfMemoryError

Upvotes: 1

Seb - SonarSource Team
Seb - SonarSource Team

Reputation: 962

I believe SonarQube is not starting for any reason related to memory but rather from the fact that you attempt to connect to MySQL Database and this DB is not supported anymore (see "Release 7.9 LTS Upgrade Notes" at https://docs.sonarqube.org/latest/setup/upgrade-notes/).

Have a look at web.log (see "Checking the logs" at https://docs.sonarqube.org/latest/setup/troubleshooting/) to confirm it, you will find a clear message there.

Upvotes: 0

Related Questions