I started to install sonarqube.
Installed nginx and mysql and sonar.
When i start script /opt/sonarqube/bin/linux/sonar.sh - it failed.
Sonarqube Startup script does not start ob ubuntu 16.04
Error log shows:
Encountered an error running main: java.lang.IllegalStateException: SonarQube requires Java 11+ to run
java.lang.IllegalStateException: SonarQube requires Java 11+ to run
at org.sonar.application.App.checkJavaVersion(App.java:93)
at org.sonar.application.App.start(App.java:56)
at org.sonar.application.App.main(App.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.lang.Thread.run(Thread.java:748)
<-- Wrapper Stopped
--> Wrapper Started as Console
Launching a JVM...
Startup failed: Timed out waiting for a signal from the JVM.
JVM did not exit on request, terminated
JVM Restarts disabled. Shutting down.
<-- Wrapper Stopped
If i run java -version:
java version "11.0.3" 2019-04-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.3+12-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.3+12-LTS, mixed mode)
Plz help ! :-(
From distant memory I think in such case you might want to make sure which Java SonarQube is picking up under the hood. Full startup logs might help (see troubleshooting doc), also maybe a quick look into the wrapper.java.command under conf/wrapper.conf (in install directory).
Could you please explain little more? If I edit the wrapper.java.command then I am getting another error.
Error: Unable to execute Java command. The system cannot find the file specified. (0x2) “\prince\bin\java**”
Critical error: wait for JVM process failed
So what value I have to provide for wrapper.java.command.
the path to java executable must be written without **. I believe @cryptoparty wanted to use the ‘*’ for formatting in his post. See comments in sonarqube-7.9.1\conf\wrapper.conf
> # Path to JVM executable. By default it must be available in PATH.
> # Can be an absolute path, for example:
> #wrapper.java.command=/path/to/my/jdk/bin/java
> wrapper.java.command=java
The easiest way is to set JAVA_HOME and add JAVA_HOME/bin to path, you will need that anyway for other java related tools.
JAVA_HOME has to be set to the root folder of your Java installation, i.e. a typical windows path c:\Program Files\Java\jdk-11
The java executable java.exe lies in %JAVA_HOME%\bin folder which in this example means c:\Program Files\Java\jdk-11\bin
Setting the environment variables with start windows settings via Win-Key + Pause, then
This is not the complete sonarqube-x.x.x\logs\sonar.log, can’t see an error message or stacktrace, please provide the whole logfile if possible (anonymize servernames and so on …)
Are there any error messages in sonarqube-x.x.x\logs\web.log or sonarqube-x.x.x\logs\es.log ?
You’re running out of free space on your disk. You need to free some disk space and follow the instructions of section “Recovering from Elasticsearch read-only indices” in https://docs.sonarqube.org/latest/setup/troubleshooting/ (where it says “non-DCE”).