Trying sonarqube for the first time

hi,
just got the link to download sonarqube.
downloaded the zip (windows 10) extrace it and went to the bin folder to execute the sonarstart.bat file.
after installing the latest JDK (15).
i still get this log failures:

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

2020.09.16 17:15:15 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\sonarqube-8.4.2.36762\temp
2020.09.16 17:15:15 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2020.09.16 17:15:15 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [D:\sonarqube-8.4.2.36762\elasticsearch]: C:\Program Files\Java\jdk-15\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -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 -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=D:\sonarqube-8.4.2.36762\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=D:\sonarqube-8.4.2.36762\elasticsearch -Des.path.conf=D:\sonarqube-8.4.2.36762\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2020.09.16 17:15:15 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
2020.09.16 17:15:15 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2020.09.16 17:15:15 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2020.09.16 17:15:15 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
FATAL StatusLogger Interrupted before Log4j Providers could be loaded.
 java.lang.InterruptedException
	at java.base/java.util.concurrent.locks.ReentrantLock$Sync.lockInterruptibly(ReentrantLock.java:159)
	at java.base/java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:372)
	at org.apache.logging.log4j.util.ProviderUtil.lazyInit(ProviderUtil.java:121)
	at org.apache.logging.log4j.util.ProviderUtil.hasProviders(ProviderUtil.java:108)
	at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:89)
	at org.elasticsearch.common.unit.ByteSizeValue.<clinit>(ByteSizeValue.java:39)
	at org.elasticsearch.common.network.NetworkService.<clinit>(NetworkService.java:57)
	at org.elasticsearch.transport.TransportSettings.<clinit>(TransportSettings.java:74)
	at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:105)
	at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:135)
	at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:277)
	at org.sonar.application.es.EsConnectorImpl$MinimalTransportClient.<init>(EsConnectorImpl.java:103)
	at org.sonar.application.es.EsConnectorImpl.buildTransportClient(EsConnectorImpl.java:89)
	at org.sonar.application.es.EsConnectorImpl.getTransportClient(EsConnectorImpl.java:74)
	at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:61)
	at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:88)
	at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:73)
	at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:58)
	at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:220)
	at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:285)
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
<-- Wrapper Stopped

any help will be appreciated

Hi,

SonarQube isn’t compatible with Java 15. You need to crank that down to Java 9, I’m afraid.

 
Ann

i installed 9 version of java (it was hard to find since it is not in the main java site) but now i get this error says that sonarqube works with 11…

C:\sonarqube-8.4.2.36762\bin\windows-x86-64>StartSonar.bat
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM…
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 |
jvm 1 | WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: SonarQube requires Java 11 to run
jvm 1 | java.lang.IllegalStateException: SonarQube requires Java 11 to run
jvm 1 | at com.google.common.base.Preconditions.checkState(Preconditions.java:508)
jvm 1 | at org.sonar.application.App.checkJavaVersion(App.java:94)
jvm 1 | at org.sonar.application.App.start(App.java:57)
jvm 1 | at org.sonar.application.App.main(App.java:98)
jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
jvm 1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
jvm 1 | at java.base/java.lang.reflect.Method.invoke(Unknown Source)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1 | at java.base/java.lang.Thread.run(Unknown Source)
wrapper | <-- Wrapper Stopped

Oops. Sorry. I misremembered.

 
:flushed:
Ann

so now the sonarqube start…
i just wanted to sumply run an analysis on some sample code, but it looks too complicated… i need to integrate it with my build machine.

isn’t there an easy way so run analysis?

Hi,

Once you’ve stood up your SonarQube server, then you can run an analysis. How you do that depends on your build system. The docs should get you started.

 
Ann