SonarQube stopped on Ubuntu 18

Hi, cannot start SonarQube 8.2 on Ubuntu 18.

Versions used:

Error observed:
Reproduced when starting sonarqube
/opt/sonarqube/bin/linux-x86-64/ start

Starting SonarQube...
Started SonarQube.
root@sonarqube:~# tail -f /opt/sonarqube/logs/sonar.log
Wrapper (Version 3.2.3)
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2020.03.23 14:50:16 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2020.03.23 14:50:16 INFO  app[][] Elasticsearch listening on /
2020.03.23 14:50:16 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2020.03.23 14:50:16 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.
2020.03.23 14:50:17 INFO  app[][o.e.p.PluginsService] no modules loaded
2020.03.23 14:50:17 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2020.03.23 14:50:32 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2020.03.23 14:50:32 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/ --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx1024m -Xms256m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.8.jar /opt/sonarqube/temp/sq-process8216515432817019169properties
2020.03.23 14:50:40 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2020.03.23 14:50:40 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2020.03.23 14:50:40 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2020.03.23 14:50:40 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

Steps to reproduced:

I was inspired by this manual

I’m running Ubuntu 18 as container on Proxmox, had to do these changes on proxmox host:
sysctl -w vm.max_map_count=262144
ulimit -n 65536
Cause I found that without this is even worse, I actually run also Sonarqube 7.9 but on Ubuntu 16, there it works fine. I have a problem to run SonarQube 8.2 on Ubuntu 18 LTS.

Java installed like this:
add-apt-repository ppa:openjdk-r/ppa
&& sudo apt-get update -q
&& sudo apt install -y openjdk-11-jdk

yes, regarding Sonarqube options:
sonar.web.javaOpts=-Xmx2024m -Xms512m -XX:+HeapDumpOnOutOfMemoryError
sonar.ce.javaOpts=-Xmx2024m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Xmx2024m -XX:+HeapDumpOnOutOfMemoryError
export SONAR_SCANNER_OPTS="-Xmx3062m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m"

the last one also found somewhere that is useful to have. on prod with 7.9 it is set btw.

and in RUN_AS_USER set to sonar, which is non-root user. I think that’s quite all.

The thing is that on Ubuntu 16 and SonarQube 7.9 it was enough to play with java memory and/or change Proxmox host options, like vm.heap stuff. But now on Ubuntu 18 and SonarQube 8.2 it doesn’t help. I don’t see what else to configure.


You’ll need to get the actual error (with some context before/after) from your server logs before anyone can help you diagnose this.


Hello Ann,
Thank you. Solved.
web.log said wrong database encoding, because postgres by default uses SQL-ASCII and for Sonarqube is UTF8.