SonarQube v10 installation on W2022. Error on running StartSonar.bat

Windows Server 2022
SonarQube Enterprise v10.0.0.68432
Java jdk-17.0.2
SQL

Receiving error when running StartSonar.bat.
• Starting SonarQube…

2023.05.04 16:41:01 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\sonarqube-10.0.0.68432\temp
2023.05.04 16:41:01 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:50567]
2023.05.04 16:41:01 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [D:\sonarqube-10.0.0.68432\elasticsearch]: C:\Program Files\Java\jdk-17.0.2\bin\java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=D:\sonarqube-10.0.0.68432\elasticsearch -Des.path.conf=D:\sonarqube-10.0.0.68432\temp\conf\es -Des.distribution.type=tar -cp D:\sonarqube-10.0.0.68432\elasticsearch\lib\*;D:\sonarqube-10.0.0.68432\elasticsearch\lib\cli-launcher\* org.elasticsearch.launcher.CliToolLauncher
2023.05.04 16:41:01 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.05.04 16:41:13 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2023.05.04 16:41:13 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [D:\sonarqube-10.0.0.68432]: C:\Program Files\Java\jdk-17.0.2\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=D:\sonarqube-10.0.0.68432\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx1G -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-10.0.0.68432.jar;D:\sonarqube-10.0.0.68432\lib\jdbc\mssql\mssql-jdbc-11.2.3.jre17.jar org.sonar.server.app.WebServer D:\sonarqube-10.0.0.68432\temp\sq-process7285942427366230419properties
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.sonar.process.PluginSecurityManager (file:/D:/sonarqube-10.0.0.68432/lib/sonar-application-10.0.0.68432.jar)
WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager
WARNING: System::setSecurityManager will be removed in a future release
2023.05.04 16:41:16 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.05.04 16:41:27 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.05.04 16:41:27 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped

Any hints or tips greatly appreciated.

Hi,

Welcome to the community!

What do your server logs say?

 
Ann

Hi Ann,

Thanks for your reply. Apologies for any stupid questions, first time using SonarQube!

There are some errors in the following logs.

web.log

2023.06.01 11:37:14 DEBUG web[][c.z.h.pool.PoolBase] HikariPool-1 - Failed to create/setup connection: 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". ClientConnectionId:0afd521d-bb99-402f-9729-023ef0164b99
2023.06.01 11:37:14 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - Cannot acquire connection from data source
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". ClientConnectionId:0afd521d-bb99-402f-9729-023ef0164b99

sonar.log

2023.06.01 11:37:09 DEBUG app[][o.e.c.RestClient] updated [[host=http://127.0.0.1:9001]] already in blacklist
2023.06.01 11:37:09 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 99] start execution
2023.06.01 11:37:09 DEBUG app[][o.a.h.c.p.RequestAddCookies] CookieSpec selected: default
2023.06.01 11:37:09 DEBUG app[][o.a.h.c.p.RequestAuthCache] Re-using cached 'basic' auth scheme for http://127.0.0.1:9001
2023.06.01 11:37:09 DEBUG app[][o.a.h.c.p.RequestAuthCache] No credentials for preemptive authentication
2023.06.01 11:37:09 DEBUG app[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 99] Request connection for {}->http://127.0.0.1:9001
2023.06.01 11:37:09 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request: [route: {}->http://127.0.0.1:9001][total kept alive: 0; route allocated: 0 of 10; total allocated: 0 of 30]
2023.06.01 11:37:09 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request failed
java.net.ConnectException: Connection refused: no further information
	at java.base/sun.nio.ch.Net.pollConnect(Native Method)
	at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)
	at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)
	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
	at java.base/java.lang.Thread.run(Thread.java:833)

Hi,

The main problem is what’s there in web.log: SonarQube can’t get a connection to the DB. It looks like a SSL/certificate problem, which is a bit out of scope for us.

 
HTH,
Ann

Hi Ann,

Yes investigating the connection error.

Thanks!