Hi. I’m trying to install the community version of sonarqube-220.127.116.11531 and connect it to MSSQL database.
I went with SQL authentication option, and created a SQL login and blank database (on a local MSSQL instance) with that login as an admin.
From the web.log I see the following:
Caused by: java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by ‘sonar.jdbc.’).
… 48 common frames omitted
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.”.) web.log (12.9 KB)
From the log itself, I assume that the configuration within sonar.conf was correct, but the issue is with the database connectivity itself. Am I correct? Any ideas on how to fix this?
I assume this might be a frequent issue on setup, but didn’t find any troubleshooting guide.
PS: Integrated Security option didn’t work as well, same issue.
It seems that TCP/IP connections were disabled for SQL server. I’ve manually enabled them via: Microsoft SQL Server > Configuration Tools > SQL Server Configuration Manager
Now there’s another error:
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: “PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.