Initial setup of SOnarQube with MS SQL Server not working

I have followed the documentation but am unable get the SonarQube server working with MS SQL Server. It works fine with H2. AS soon as I uncomment the below entries I am unable to start the SonarQube process.

Below are the logs when trying to start SonarQube with the above SQL settings enabled.

Log Snippet.
jvm 1 | 2020.09.14 11:58:42 INFO app[o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2020.09.14 11:58:42 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [C:\sonarqube-]: C:\Program Files\Java\jdk-14.0.2\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8\sonarqube-\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/ --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.|[::1] -cp ./lib/common/;C:\sonarqube-\lib\jdbc\mssql\mssql-jdbc-7.4.1.jre11.jar C:\sonarqube-\temp\sq-process17828685245752340572properties
jvm 1 | 2020.09.14 11:59:07 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
jvm 1 | 2020.09.14 11:59:07 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1 | 2020.09.14 11:59:07 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | <-- Wrapper Stopped


Welcome to the community!

What do your server logs say?


Here all the logs.

access.log (16.8 KB) ce.log (1.9 KB) es.log (50.4 KB) sonar.log (35.8 KB) web.log (143.3 KB)

Hi, here is the piece of information that will help:

Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: no further information. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".)

So it looks like a connectivity issue between SonarQube and your database.

Thank you. My SQL instance is listening on 1433. Everything is on the same server and all firewalls on the server are disabled. I can connect to the Database using the SQL credentials defined in the properties file without any issues.
I attached the SQL Connection configuration for reference.

I enabled TCPIP and Named Pipes and it’s working now.
Thanks for the help.