Error starting SonarQube server


I am using SonarQube community edition version
Maven 3.8.4
Java version 11.0.12 with JDK 11
Java SE runtime environment 18.9 (build 11.0.12 + 8-LTS-237)
Java Hotspot 64-bit server VM 18.9 (the same build from above)
Plugin 8.x
I have a JAVA_HOME variable : C:\Progra~1\Java\jdk-11.0.12

I’m in the first steps to do a plugin for SonarQube, as first, I downloaded and ran the StartSonar.bat, but it gave me the following error:

wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3)
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    |
jvm 1    | 2022.01.10 10:43:07 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\temp
jvm 1    | 2022.01.10 10:43:07 INFO  app[][] Elasticsearch listening on [HTTP:, TCP:]
jvm 1    | 2022.01.10 10:43:08 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube\elasticsearch]: C:\Program Files\Java\jdk-11.0.12\bin\java -XX:+UseG1GC\sonarqube\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djna.tmpdir=C:\sonarqube\temp -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j2.formatMsgNoLookups=true -Djava.locale.providers=COMPAT -Dcom.redhat.fips=false -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube\elasticsearch -Des.path.conf=C:\sonarqube\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1    | 2022.01.10 10:43:08 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | 2022.01.10 10:43:19 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1    | 2022.01.10 10:43:19 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\sonarqube]: C:\Program Files\Java\jdk-11.0.12\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8\sonarqube\temp -XX:-OmitStackTraceInFastThrow --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 --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/ -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-;C:\sonarqube\lib\jdbc\h2\h2-1.4.199.jar C:\sonarqube\temp\sq-process8852872289203228753properties
jvm 1    | 2022.01.10 10:44:07 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
jvm 1    | 2022.01.10 10:44:07 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1    | 2022.01.10 10:44:07 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper  | <-- Wrapper Stopped

I already change in the port from 9000 to 9005 but the error remains the same.

Here are my logs
es.log (10.9 KB)
sonar.20220110.log (5.7 KB)
web.log (27.3 KB)

I appreciate any orientation or help!


Welcome to the community!

Did you look at your logs? If so, what did you make of them?

For me, this is pretty clear:

2022.01.10 10:44:06 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Rule with key 'foo-foolint:ExampleRule2' not found

What may be less clear for you is where that’s coming from. I’m guessing it’s caused by this plugin:

2022.01.10 10:43:25 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Example Plugin for SonarQube 8.x / 8.1.0 / null

You’re on SonarQube 9.2.4. At a guess, an 8.1.0 example plugin is no longer compatible, although I’m not familiar with that plugin. So you’ll want to start by removing that plugin & then see if it will start up for you.

The other thing I noticed when looking at your web.log is that you’re using the embedded, H2 database. Obviously you’ll want to connect to a supported DB for production. :slightly_smiling_face:


1 Like

Hello , thanks for quick answer,

This is the plugin [GitHub - SonarSource/sonar-custom-plugin-example: Shows how to write a SQ plugin for LTS].
I understand i need to use the version 8.9.6 LTS of SonarQube for the plugin works , isn’t?


Are you trying to get started with plugin development? If so, then a downgrade to the LTS might help - altho I really am unfamiliar with that plugin, so I can’t be sure. If not, I’d just jettison the plugin and go forward with the current version.


Hello everyone,

Is this problem solved? I am facing the same problem when trying to add a new plugin for a new language.
Any info is welcomed. Thanks !