I read in the documentation of Sonarqube 9.9 LTS the following when it comes to Java requirements:
Server: Open JDK 17
Scanner: Open JDK 11 / Open JDK 17
Am I correct in my understanding that Sonarqube 9.9 LTS minimum java requirements to run the actual application requires Open JDK 17 but what’s with the scanner? Is the scanner responsible in doing the analysis of the code that is being sent to it and generates a report? But if there’s a code written in Open JDK 1.8 for example, Sonarqube 9.9 LTS will still be able to analyze the code am I correct?
Java 17 is required to run the server. You can perform analysis - on your build agent - with either Java 11 or 17.
But you can compile with or to any version of Java that you want and as long as you’re running analysis with Java 11 or 17 you should be good to go.
We recently ported our documentation to a new platform, and since SonarQube 9.5 was EOL when 9.6 was released, that version of the docs didn’t get ported.
Can you please provide me a versions details of both sonarQube and Java to run on the Production.
Since im trying to configure that in my AWS Linux EC2 instance.
Im using the Java 17 and SonarQube 8.9 , But i got the below error when i try to run the sonarQube server using the ./sonar.sh start → this shows like started, but when i check status that shows like SonarQube is not running
2024.02.17 14:18:56 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:39633]
2024.02.17 14:18:56 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube-8.9.0.43852/elasticsearch]: /opt/sonarqube-8.9.0.43852/elasticsearch/bin/elasticsearch
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
2024.02.17 14:18:56 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
2024.02.17 14:18:56 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2024.02.17 14:18:56 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2024.02.17 14:18:56 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2024.02.17 14:18:56 ERROR app[][o.s.a.p.EsManagedProcess] Failed to check status
java.lang.RuntimeException: thread waiting for the response was interrupted
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:849)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:283)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:270)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1654)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1624)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1594)
at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:119)
at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:64)
at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:89)
at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:74)
at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:59)
at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:220)
at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:285)
Caused by: java.lang.InterruptedException: null
at java.base/java.lang.Object.wait(Native Method)
at java.base/java.lang.Object.wait(Object.java:338)