Reputation: 808
I installed the latest version of SonarQube 6.5 and have been able to get the SonarQube server up and running. I have my SQL Server database named ‘Sonar’ created with a user named ‘SonarUser’ and have given it admin rights. I have changed the collation to be case-sensitive (CS) and accent-sensitive (AS). I have downloaded the jdbc driver and put it in the correct folders. Followed the steps mentioned here - https://docs.sonarqube.org/display/SONAR/Installing+the+Server
However I am not able to make either Windows Authentication or SQL Server Authentication to work. The database is still empty, and do not see the tables/indexes in there.
I am making the below changes to the ‘sonar.properties’ file – 1 at a time – but it does not work
SQL Authentication
sonar.jdbc.username=SonarUser
sonar.jdbc.password=SonarUser
sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=Sonar
Windows Authentication
sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=Sonar;
integratedSecurity=true
When I make any change to the ‘sonar.properties’ file and then start the Sonar Server, it fails with the following error –
2017.10.03 16:59:09 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Sonarqube-6.5\temp 2017.10.03 16:59:09 INFO app[][o.s.a.p.JavaProcessLauncherImpl] Launch process[es]: C:\Program Files\Java\jre1.8.0_101\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\Sonarqube-6.5\temp -cp ./lib/common/;./lib/search/ org.sonar.search.SearchServer C:\Sonarqube-6.5\temp\sq-process1211130103830390174properties 2017.10.03 16:59:19 INFO app[][o.s.a.SchedulerImpl] Process[es] is up 2017.10.03 16:59:19 INFO app[][o.s.a.p.JavaProcessLauncherImpl] Launch process[web]: C:\Program Files\Java\jre1.8.0_101\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\Sonarqube-6.5\temp -cp ./lib/common/;./lib/server/;C:\Sonarqube-6.5\lib\jdbc\mssql\mssql-jdbc-6.1.0.jre8.jar org.sonar.server.app.WebServer C:\Sonarqube-6.5\temp\sq-process7396503632227644033properties 2017.10.03 16:59:23 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped 2017.10.03 16:59:24 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped 2017.10.03 16:59:24 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped <-- Wrapper Stopped
If I undo the changes in ‘sonar.properties’ file, and run the StartSonar.bat - the server runs fine. Any help will be appreciated.
Upvotes: 2
Views: 1817
Reputation: 808
I was finally able to get through this error and was able to configure my SQL Database. In the web.log file, I saw the error message -
Unsupported mssql version: 10.0. Minimal supported version is 11.0.
Basically I was running an older version of SQL Server, which was causing this error. Once I created a database in SQL Server 2014 with this above steps, I was able to run the SonarQube instance without any issues. All the required tables got created in the database. I also confirmed that there are records inserted into the tables as you run SonarQube against my projects.
Upvotes: 3