Getting a SQLServerException "PKIX path building failed" error after upgrade

Upgrading from 9.6.1 to 9.9 LTS?
Windows 10, Java 17, SQLEXPRESS/SQL Server 15.0.2

I followed the instructions for upgrading SonarQube through the “Upgrading to 9.9 LTS” guide. We took a backup of the database, unzipped the new SonarQube package, and then updated the new file with all of the configuration data that we’d set for the previous instance of SonarQube.
I had to add the wrapper.conf file to the properties directory to point SonarQube to the newer version of Java we installed (17, updated from 11.10.12), but now when I try to run SonarService.bat start, I get the error “FATAL - The specified service does not exist as an installed service”

When I try to run StartSonar.bat, like how we were running the older version of SonarQube, I get the error listed in the title of this post: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: unable to find valid certification path to requested target". ClientConnectionId:[some connection ID]


did you setup the service ?

%SONARQUBE_HOME%\bin\windows-x86-64\SonarService.bat install


means the keystore of your Java runtime on Sonarqube server is missing the certificates of your organization to be able to connect to database.
this search brings up a lot of similar cases and may be helpful


1 Like

Well, doing the install definitely did something! Thanks for the guidance!

It successfully installed and now when I run “SonarService.bat start”, it says “SonarQube (SonarQube) started successfully”.

However, navigating to my SonarURL (which is just our LocalHost since we’re running this on a VM) still shows that nothing is running, and trying to go to /setup brings me to the same “this site can’t be reached” page.

StartSonar.bat still also throws the same error.

I saw your responses to this same issue over in this thread and similar, but while you say not to just do the “half-baked” server trust workaround, the solution you suggest of going to the setup url doesn’t seem to be working for me either.

i didn’t propose that in the thread, but to fix the certificate problem with the java keystore.
Anyway, did you already check the logs in %SONARQUBE_HOME%\logs ?

Sorry, I was unclear. There’s several posts about this problem and it seemed like one of them you’d had someone go to the /setup page.

I did check the the new logs and it’s giving me the same error. I suppose I’m not entirely sure how to fix the cert problem in the java keystore. My company doesn’t have a dedicated Java Admin and I don’t remember having to do anything special when trying to install the older version of SonarQube a year or two ago.

You may check your Sonarqube server certs like that