SonarQube 6.5 - Not able to configure the SQL Server Database

243 views
Skip to first unread message

Samir Behara

unread,
Oct 3, 2017, 6:56:08 PM10/3/17
to SonarQube

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.

seet...@gmail.com

unread,
Oct 4, 2017, 3:55:30 AM10/4/17
to SonarQube
The new version comes with a local DB configuration and doesn't reply on external Database.

I had posted this earlier but since there were no responses, I went ahead with the default and standard local DB provided by Sonar.

Simon Brandhof

unread,
Oct 4, 2017, 7:34:16 AM10/4/17
to seet...@gmail.com, SonarQube
Hi Samir,

Remote databases are obviously supported. In your case there's probably an authentication error when connecting to the database. You should check the root cause in logs/web.log.

Regards

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/e4034940-eaa0-43d1-a8a1-ce35e327964b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Simon Brandhof | SonarSource

Co-Founder & Tech Lead

@SimonBrandhof

http://sonarsource.com

G. Ann Campbell

unread,
Oct 4, 2017, 10:27:12 AM10/4/17
to SonarQube
Hi,

Please don't cross-post here and on StackOverflow

Also, please be aware that the standard courtesies (Hi, Thanks, ...) are appreciated in this group.


Ann

seet...@gmail.com

unread,
Oct 9, 2017, 1:17:30 AM10/9/17
to SonarQube
Hi Simon,

Can you help me understand where to configure the SQL Server settings? Which file and preferably the location of the file?

Regards,

Seetesh Hindlekar

Eric Hartmann

unread,
Oct 9, 2017, 1:45:54 AM10/9/17
to seet...@gmail.com, SonarQube
Hi Seetesh,

The configuration file is located in <install_directory>/conf/sonar.properties.

Cheers,


For more options, visit https://groups.google.com/d/optout.
--
Eric HARTMANN | SonarSource
Reply all
Reply to author
Forward
0 new messages