I have followed the instructions to download the source for version 7.9, built using Gradle and started as per the readme.md, on Windows 10, 64 bit.
SonarQube however fails to start. The web.log shows:
2019.07.27 21:26:22 INFO web[o.s.p.ProcessEntryPoint] Starting web
2019.07.27 21:26:23 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2019.07.27 21:26:23 ERROR web[o.s.s.p.Platform] Web server startup failed
java.lang.NumberFormatException: For input string: ānullā
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Long.parseLong(Long.java:692)
at java.base/java.lang.Long.parseLong(Long.java:817)
at org.sonar.api.utils.Version.parseFieldAsLong(Version.java:175)
at org.sonar.api.utils.Version.parse(Version.java:137)
at org.sonar.api.internal.MetadataLoader.loadVersion(MetadataLoader.java:50)
at org.sonar.server.platform.platformlevel.PlatformLevel1.configureLevel(PlatformLevel1.java:87)
at org.sonar.server.platform.platformlevel.PlatformLevel.configure(PlatformLevel.java:74)
at org.sonar.server.platform.Platform.start(Platform.java:208)
at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:170)
at org.sonar.server.platform.Platform.init(Platform.java:86)
at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4817)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5283)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
2019.07.27 21:26:24 WARN web[o.a.c.u.SessionIdGeneratorBase] Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [200] milliseconds.
2019.07.27 21:26:24 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2019.07.27 21:26:24 INFO web[o.s.p.ProcessEntryPoint] Hard stopping process
Please could you tell me what is missing? It appears to not to be populating itās version. Is there another configuration not documented in the readme.md file that is needed?
Iām guessing youāre using a bleeding-edge (pre-release?) version of Java and SonarQube is failing to parse the version number. Fall back to a the latest Java 11, and you should be fine.
I did try multiple versions of java. Note this occurs both when:
downloading and extracting the zip and setting the path explicitly in wrapper.conf and
when running the installer (and adding to the System PATH the java\bin directory).
The version that produced the above output is:
C:\sonar\java\jdk-11.0.4\bin>java -version
java version ā11.0.4ā 2019-07-16 LTS
Javaā¢ SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
Java HotSpotā¢ 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)
using this setting in wrapper.conf
wrapper.java.command=ā¦/ā¦/ā¦/java/jdk-11.0.4/bin/java.exe OR using
wrapper.java.command=java (when installing java with the installer and PATH update).
The same error occurs with 11.0.0 and 12.0.2 (as you thought it might).
It also fails with an incompatibility error when using the older 8.0 (aka 1.8 - but that behaviour is by design).
I also tried the OpenJDK version 11 and this also produces the same error.
This is on Windows 10 64bit with all the latest updates. There are no other java copies installed.
$ java -version
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)
Admittedly, Iām building from a slightly different copy of the source than you are, but I built (skipping tests) and started up just fine.
Out of curiosity, your quoted path shows you executed -version from next to the executable. I wonder if you get the same value from another directory? I.e. I wonder if your default Java is the one you think it is. (Yes, I know you said youāve only got one installed.)
Also, do you have any problems starting a downloaded instance?
Yes, sorry, you can edit the file mentionned, and, instead of 7.9.0.null you can just replace the null by an extra 0. I didnāt test it but it should be working.