Sonarqube 7.6 fails startup failure: FATAL Log4j2 could not find a logging implementation

Sonarqube/Elasticsearch fails starting-up with log4j errors:

  • Sonarqube 7.6
2019.03.19 10:51:25 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
FATAL StatusLogger Interrupted before Log4j Providers could be loaded.
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(
	at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(
	at org.apache.logging.log4j.util.ProviderUtil.lazyInit(
	at org.apache.logging.log4j.util.ProviderUtil.hasProviders(
	at org.apache.logging.log4j.LogManager.<clinit>(
	at org.elasticsearch.common.logging.ESLoggerFactory.getLogger(
	at org.elasticsearch.common.logging.Loggers.getLogger(
	at org.elasticsearch.common.logging.Loggers.getLogger(
	at org.elasticsearch.common.component.AbstractComponent.<init>(
	at org.elasticsearch.plugins.PluginsService.<init>(
	at org.elasticsearch.client.transport.TransportClient.newPluginService(
	at org.elasticsearch.client.transport.TransportClient.buildTemplate(
	at org.elasticsearch.client.transport.TransportClient.<init>(
	at org.sonar.application.process.EsProcessMonitor.checkStatus(
	at org.sonar.application.process.EsProcessMonitor.checkOperational(
	at org.sonar.application.process.EsProcessMonitor.isOperational(
	at org.sonar.application.process.SQProcess.refreshState(
	at org.sonar.application.process.SQProcess$
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
  • Sonarqube on CentOS7 and Openjdk version “1.8.0_201”
1 Like

I have fixed this, the problems was with some wrong Elasticsearch configs, Xms and Xmx were inverted

1 Like

Weird behavior! Thanks for the follow-up Federico.

Excuse me,I used it for the first time and have the same problem. Can you tell me how to solve it?
I don’t know what “Xms and Xmx were inverted” mean?

How did you fix it?

I had the same issue. I still have not resolved the log4j exception that is visible in the log file, but I found out there was some strange configuration in the file, and namely - I had an entry named, which I commented out, and finally I have only sonar.jdbc.url/password/username in the configuration file.

Used JDK 15, had same issue

Installed OpenJDK 11 instead (

opened “[path to sonarqube folder]\conf\wrapper.conf

replaced “

with “\Program Files\Java\jdk-11\bin\java.exe

worked for me.

As an old topic with a good solution, I’m going to mark this closed :+1: