ArnabT
(Arnab Talukdar)
September 29, 2023, 11:13am
1
I am getting the below error while trying to to use “D:\sonarqube-9.9.2.77730\bin\windows-x86-64>StartSonar.bat” from the command line. I have installed JDK 17 and also have set the Environment variable - SONAR_JAVA_PATH “C:\Program Files\Java\jdk-17\bin\java.exe” to overwrite the default java executable.
What version are you upgrading from? 8.9.8
System information (Operating system, Java version, Database provider/version) SQL server SonarQube server and database server are separate Hosts.
What’s the issue you’re facing?
I am using SQL Authentication
sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar
sonar.jdbc.username=sonarqube
sonar.jdbc.password=mypassword
Getting the below error
2023.09.29 07:04:59 INFO web[][o.s.p.ProcessEntryPoint] Starting Web Server 2023.09.29 07:05:01 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.9.2.77730 / dd63ff5d0db91f039afd5d40319122666c9961ef 2023.09.29 07:05:01 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://<Server>;databaseName=Sonar_Test 2023.09.29 07:05:01 INFO web[][c.z.h.HikariDataSource] HikariPool-1 - Starting... 2023.09.29 07:05:03 ERROR web[][c.z.h.p.HikariPool] HikariPool-1 - Exception during pool initialization. com.microsoft.sqlserver.jdbc.SQLServerException: 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".
Kindly help me out to get this going, Thank you
Welcome
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
https://community.sonarsource.com/search?q=PKIX%20path%20building%20failed
Gilbert
ArnabT
(Arnab Talukdar)
September 29, 2023, 12:23pm
3
I added <;trustServerCertificate=true> in the properties file like
sonar.jdbc.url=jdbc:sqlserver://;databaseName=;trustServerCertificate=true.
Now, the previous error is gone but have a different error. Can you please suggest what can be done in this case please.
2023.09.29 07:22:31 INFO web[][o.s.p.ProcessEntryPoint] Starting Web Server
2023.09.29 07:22:33 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.9.2.77730 / dd63ff5d0db91f039afd5d40319122666c9961ef
2023.09.29 07:22:33 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://<dbServerName>;databaseName=<DBName>;trustServerCertificate=true
2023.09.29 07:22:33 INFO web[][c.z.h.HikariDataSource] HikariPool-1 - Starting...
2023.09.29 07:22:34 INFO web[][c.z.h.p.HikariPool] HikariPool-1 - Added connection ConnectionID:1 ClientConnectionId: dd8bffdf-be45-4420-8dbf-e19659a2b970
2023.09.29 07:22:34 INFO web[][c.z.h.HikariDataSource] HikariPool-1 - Start completed.
2023.09.29 07:22:36 INFO web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: D:\sonarqube-9.9.2.77730
2023.09.29 07:22:36 INFO web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2023.09.29 07:22:36 INFO web[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: enterprise-edition, ce-workers, developer-scanner, developer-server, governance, license, securityreport, monitoring, scim
2023.09.29 07:22:36 WARN web[][o.s.s.p.DatabaseServerCompatibility] The database must be manually upgraded. Please backup the database and browse /setup. For more information: https://docs.sonarqube.org/latest/setup/upgrading
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy ABAP Code Quality and Security / 3.11.0.4030 / efe73c1da897a69d2545e79710bec0909326dcdb
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Apex Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy C# Code Quality and Security / 8.51.0.59060 / e14c642f118958f22fd08841dc42f9aae480366a
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy CFamily Code Quality and Security / 6.41.1.62265 / 9a86fb481d3f05ac5d3fc7d21aa20f88534a8cfe
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy COBOL Code Quality / 5.2.0.5949 / e2e398ef68a9ee212c8b991cf05ee1fae28e5326
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Configuration detection fot Code Quality and Security / 1.2.0.267 / 4f37ba9ffb37a96d5883e52ad392ed32c5c6eaab
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Dataflow Bug Detection / 1.10.0.3046 / 0
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Dataflow Bug Detection Rules for Java / 1.10.0.3046 / 0
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Dataflow Bug Detection Rules for Python / 1.10.0.3046 / 0
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Flex Code Quality and Security / 2.8.0.3166 / 01f66bdddc678966c81a9064ed139156a6a89c97
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Go Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy HTML Code Quality and Security / 3.7.1.3306 / d720acc6860c6d8b69ec4d17570a398a1e216da1
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy IaC Code Quality and Security / 1.11.0.2847 / 6892bd3a7320b3c110717acfdb18c4c7451069fd
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy JaCoCo / 1.3.0.1538 / 74a7798c7cea687c72ed9df40c93eb7ea2a58c49
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Java Code Quality and Security / 7.16.0.30901 / 4b1436558dfd5fc00c8d9aae8bb0364ba122c73e
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy JavaScript/TypeScript/CSS Code Quality and Security / 9.13.0.20537 / 68ff7657415044b86033814795ed95fc1f1558f1
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Kotlin Code Quality and Security / 2.12.0.1956 / a6df1ae252bd62d63f8673c28f87ad14258a7904
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy PHP Code Quality and Security / 3.27.1.9352 / 3ddc5a03e1a7e3729d41e7c1a30a37d5715958c7
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy PL/I Code Quality and Security / 1.12.0.3443 / e9d43136dec6eea6c0129c12d2a019d141fdcc39
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy PL/SQL Code Quality and Security / 3.8.0.4948 / ab46f4c11644e5c9b17f0a5a1612d4b7362e04f3
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Python Code Quality and Security / 3.24.1.11916 / cc8f4fa745eb33d31c3869bdfdfd45514e67c1fe
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy RPG Code Quality / 3.3.0.3147 / 9cb6a4566eb55cc6b874220ab95f0504a952b560
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Ruby Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Scala Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Swift Code Quality and Security / 4.8.0.5759 / 3d5b95aaf19a398736a7f5eec314c3c05f7193d2
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy T-SQL Code Quality and Security / 1.7.0.5449 / 110c82f888b1f40e1c2a0d3165fcffd413af36a5
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Text Code Quality and Security / 2.0.2.1090 / 7eb026363b98f5f98b43c603772b5177869c2c6a
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy VB.NET Code Quality and Security / 8.51.0.59060 / e14c642f118958f22fd08841dc42f9aae480366a
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy VB6 Code Quality and Security / 2.9.0.3341 / 2066b6ff3d7c789fefa0b86c6f70e9c9eb08f852
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Analysis / 9.9.2.22117 / 63ec18952dc2268064c095158aa5136ee596afe0
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for C# / 9.9.2.22117 / 63ec18952dc2268064c095158aa5136ee596afe0
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for JS / 9.9.2.22117 / 63ec18952dc2268064c095158aa5136ee596afe0
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for Java / 9.9.2.22117 / 63ec18952dc2268064c095158aa5136ee596afe0
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for PHP / 9.9.2.22117 / 63ec18952dc2268064c095158aa5136ee596afe0
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for Python / 9.9.2.22117 / 63ec18952dc2268064c095158aa5136ee596afe0
2023.09.29 07:22:37 INFO web[][o.s.s.p.ServerPluginManager] Deploy XML Code Quality and Security / 2.7.0.3820 / 656bccc1910d50c8984536bd2dfd917066b858e6
2023.09.29 07:22:40 INFO web[][o.s.s.p.d.m.c.MssqlCharsetHandler] Verify that database collation is case-sensitive and accent-sensitive
2023.09.29 07:22:41 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://127.0.0.1:9001]
2023.09.29 07:22:41 WARN web[][o.s.a.s.w.WebService$Action] Description is not set on action api/monitoring/metrics
2023.09.29 07:22:41 WARN web[][o.s.a.s.w.WebService$Action] Since is not set on action api/monitoring/metrics
2023.09.29 07:22:41 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/monitoring/metrics
2023.09.29 07:22:41 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
2023.09.29 07:22:41 INFO web[][o.s.s.p.Platform] Database needs to be migrated. Please refer to https://docs.sonarqube.org/latest/setup/upgrading
2023.09.29 07:22:41 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@360d41d0 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
2023.09.29 07:22:41 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
means you need to browse https://<yoursonarurl>/setup
and follow the instructions.
trustServerCertificate=true
aka trust all ain’t recommended