Sonar logs files (sonar.log,web.log,ce.log,es.log) are not created

Started Installing sonarqube using Install the server
My os is Ubuntu 20.04.2 LTS, I installed SonarQube version 10.1.0.73491, I am not a root user, I have set
SONAR_JAVA_PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin/java
although my default java is 1.8 for other projects.
Below are my config file for sonar

sonar.jdbc.username=sonarqube
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:oracle:thin:@localhost:1521/orcl
sonar.web.javaAdditionalOpts=-server
sonar.web.host=127.0.0.1
sonar.web.context=/sonarqube
sonar.java.jdkHome=/usr/lib/jvm/java-11-openjdk-amd64
sonar.java.source=11

On running
sudo sh linux-x86-64/sonar.sh start
I get

/usr/bin/java
Starting SonarQube...
Started SonarQube.

But I cant access it on 9090 port and on checking status
sudo sh linux-x86-64/sonar.sh status
I get

/usr/bin/java
Removed stale pid file: ./SonarQube.pid
SonarQube is not running.

On using console command
sudo sh linux-x86-64/sonar.sh console
it gives

/usr/bin/java
Running SonarQube...
Error: LinkageError occurred while loading main class org.sonar.application.App
	java.lang.UnsupportedClassVersionError: org/sonar/application/App has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

but I have already set `SONAR_JAVA_PATH varible as mentioned above.

Also log files are not created, any help appreciated.

Hey there.

Java 17 is the minimum runtime version for SonarQube v10.1 (and all versions since v9.9 LTS). That explains the issue you’re getting here:

55.0 = Java 11, 61.0 = Java 17

Yes, to Java 11. Make sure it’s set to a Java 17 installation!

Hi @Colin , thank you for your response, this wors well after updating java path for sonar, but some specific migration is failed and error is
Caused by: java.sql.SQLException: ORA-01450: maximum key length (6398) exceeded
I am using oracle 19.3 and have ojdbc11.jar in my sonar jdbc folder

EDIT:
Also didnt work on ojdbc10.jar

These have no impact for server-side configuration. They are sometimes used in the analysis of Java files scanner-side.

How are you setting it?

I set it using the export command. I can start sonar now, but migrations are failing with,
Caused by: java.sql.SQLException: ORA-01450: maximum key length (6398) exceeded.

It worked fine after I created new tablespace with bigger block size(32K). Created new schema on that tablespace and restarted sonar on it. Thanks @Colin for replying.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.