Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonarqube Scanning failing with MSBuild 7.1.1 #2117

Open
tiwarishrijan opened this issue Jul 29, 2024 · 4 comments
Open

Sonarqube Scanning failing with MSBuild 7.1.1 #2117

tiwarishrijan opened this issue Jul 29, 2024 · 4 comments

Comments

@tiwarishrijan
Copy link

tiwarishrijan commented Jul 29, 2024

We are using SonarQube in private Instance with server version - v10.6 (92116) with private SSL certificate and we noticed if we use MSBuild version 7.1.1 we get below error

2024-07-29T11:45:46.0217190Z Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Same is working fine with version 6.2.x
we already have SSL Cert loaded in machine.

This started specially when sonarqube version in azure markeplace is upgraded today.

@tiwarishrijan tiwarishrijan changed the title Sonarqube Scanning failing with 7.1.1 Sonarqube Scanning failing with MSBuild 7.1.1 Jul 29, 2024
@gregory-paidis-sonarsource
Copy link
Contributor

Hey, could you give us the debug level logs of the begin and the end step?
You can do that by specifying /d:sonar.verbose=true on the begin step.

Feel free to scrub any private information beforehand.

Thanks in advance!

@tiwarishrijan
Copy link
Author

2024-07-30T07:38:42.6008219Z ##[debug]Evaluating condition for step: 'Run Code Quality Analysis'
2024-07-30T07:38:42.6008832Z ##[debug]Evaluating: SucceededNode()
2024-07-30T07:38:42.6009029Z ##[debug]Evaluating SucceededNode:
2024-07-30T07:38:42.6009364Z ##[debug]=> True
2024-07-30T07:38:42.6009577Z ##[debug]Result: True
2024-07-30T07:38:42.6009802Z ##[section]Starting: Run Code Quality Analysis
2024-07-30T07:38:42.6013049Z ==============================================================================
2024-07-30T07:38:42.6013127Z Task         : Run Code Analysis
2024-07-30T07:38:42.6013188Z Description  : Run scanner and upload the results to the SonarQube server.
2024-07-30T07:38:42.6013265Z Version      : 6.3.0
2024-07-30T07:38:42.6013306Z Author       : sonarsource
2024-07-30T07:38:42.6013389Z Help         : This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarqube-extension-for-azure-devops/)
2024-07-30T07:38:42.6013579Z ==============================================================================
2024-07-30T07:38:42.6042587Z ##[debug]Resource Utilization warnings is disabled, switch "DISABLE_RESOURCE_UTILIZATION_WARNINGS" variable to "true" if you want to enable it
2024-07-30T07:38:42.6104824Z ##[debug]Using node path: /azp/externals/node16/bin/node
2024-07-30T07:38:42.6844846Z ##[debug]agent.TempDirectory=/azp/_work/_temp
2024-07-30T07:38:42.6850810Z ##[debug]loading inputs and endpoints
2024-07-30T07:38:42.6853660Z ##[debug]loading INPUT_JDKVERSION
2024-07-30T07:38:42.6860614Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2024-07-30T07:38:42.6861975Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2024-07-30T07:38:42.6862979Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2024-07-30T07:38:42.6867103Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2024-07-30T07:38:42.6868412Z ##[debug]loading SECRET_SONAR_ENDPOINT
2024-07-30T07:38:42.6869875Z ##[debug]loaded 6
2024-07-30T07:38:42.6881159Z ##[debug]Agent.ProxyUrl=undefined
2024-07-30T07:38:42.6881659Z ##[debug]Agent.CAInfo=undefined
2024-07-30T07:38:42.6881887Z ##[debug]Agent.ClientCert=undefined
2024-07-30T07:38:42.6882560Z ##[debug]Agent.SkipCertValidation=undefined
2024-07-30T07:38:42.6976891Z ##[debug]Agent.ProxyUrl=undefined
2024-07-30T07:38:42.6977305Z ##[debug]Agent.CAInfo=undefined
2024-07-30T07:38:42.6977560Z ##[debug]Agent.ClientCert=undefined
2024-07-30T07:38:42.6978071Z ##[debug]check path : /azp/_work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/6.3.0/lib.json
2024-07-30T07:38:42.6980375Z ##[debug]adding resource file: /azp/_work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/6.3.0/lib.json
2024-07-30T07:38:42.6980700Z ##[debug]system.culture=en-US
2024-07-30T07:38:42.7416757Z ##[debug]jdkversion=JAVA_HOME_17_X64
2024-07-30T07:38:42.7417227Z ##[debug]SONAR_SCANNER_MODE=MSBuild
2024-07-30T07:38:42.7417500Z ##[debug]SONAR_SERVER_VERSION=10.6.0
2024-07-30T07:38:42.7418054Z ##[debug]JAVA_HOME_17_X64=/usr/lib/jvm/java-17-openjdk-amd64/
2024-07-30T07:38:42.7418397Z ##[debug]JAVA_HOME_17_X64 was found with value /usr/lib/jvm/java-17-openjdk-amd64/, will switch to it for Sonar scanner...
2024-07-30T07:38:42.7418734Z ##[debug]JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/
2024-07-30T07:38:42.7419160Z ##[debug]set JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/
2024-07-30T07:38:42.7419737Z ##[debug]Processed: ##vso[task.setvariable variable=JAVA_HOME;isOutput=false;issecret=false;]/usr/lib/jvm/java-17-openjdk-amd64/
2024-07-30T07:38:42.7420158Z ##[debug]SONAR_SCANNER_MODE=MSBuild
2024-07-30T07:38:42.7421007Z ##[debug]SONARQUBE_SCANNER_PARAMS={"sonar.host.url":"https://sonarqube.xxxxxxxxxx","sonar.token":***,"sonar.projectKey":"xxxxxxxx","sonar.projectVersion":"1.0","sonar.scanner.metadataFilePath":"/azp/_work/_temp/sonar/148510/eb9f8560-152b-ba11-34bd-c75edb18a561/report-task.txt","sonar.exclusions":"**/QDShared/**,**/ScenarioLake/**","sonar.c.file.suffixes":"-","sonar.cpp.file.suffixes":"-","sonar.objc.file.suffixes":"-"}
2024-07-30T07:38:42.7422166Z ##[debug]SONAR_SCANNER_MSBUILD_DLL=/azp/_work/_tasks/SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157/6.3.0/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll
2024-07-30T07:38:42.7422580Z ##[debug]Using scanner at /azp/_work/_tasks/SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157/6.3.0/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll
2024-07-30T07:38:42.7422911Z ##[debug]which 'dotnet'
2024-07-30T07:38:42.7425428Z ##[debug]found: '/usr/bin/dotnet'
2024-07-30T07:38:42.7425928Z ##[debug]which '/usr/bin/dotnet'
2024-07-30T07:38:42.7426740Z ##[debug]found: '/usr/bin/dotnet'
2024-07-30T07:38:42.7427493Z ##[debug]/usr/bin/dotnet arg: /azp/_work/_tasks/SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157/6.3.0/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll
2024-07-30T07:38:42.7428031Z ##[debug]/usr/bin/dotnet arg: end
2024-07-30T07:38:42.7429323Z ##[debug]exec tool: /usr/bin/dotnet
2024-07-30T07:38:42.7429598Z ##[debug]arguments:
2024-07-30T07:38:42.7429880Z ##[debug]   /azp/_work/_tasks/SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157/6.3.0/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll
2024-07-30T07:38:42.7430136Z ##[debug]   end
2024-07-30T07:38:42.7431208Z [command]/usr/bin/dotnet /azp/_work/_tasks/SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157/6.3.0/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll end
2024-07-30T07:38:42.7999182Z SonarScanner for MSBuild 7.1.1
2024-07-30T07:38:42.8000632Z Using the .NET Core version of the Scanner for MSBuild
2024-07-30T07:38:42.8415691Z Post-processing started.
2024-07-30T07:38:42.9940591Z Calling the SonarScanner CLI...
2024-07-30T07:38:43.0730688Z INFO: Scanner configuration file: /azp/_work/_tasks/SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157/6.3.0/dotnet-sonar-scanner-msbuild/sonar-scanner-5.0.1.3006/conf/sonar-scanner.properties
2024-07-30T07:38:43.0731148Z INFO: Project root configuration file: /azp/_work/1/.sonarqube/out/sonar-project.properties
2024-07-30T07:38:43.1119541Z INFO: SonarScanner 5.0.1.3006
2024-07-30T07:38:43.1119983Z INFO: Java 17.0.11 Eclipse Adoptium (64-bit)
2024-07-30T07:38:43.1120207Z INFO: Linux 5.15.0-1067-azure amd64
2024-07-30T07:38:43.2538081Z INFO: User cache: /home/nn-admin/.sonar/cache
2024-07-30T07:38:43.4279358Z INFO: ------------------------------------------------------------------------
2024-07-30T07:38:43.4281012Z INFO: EXECUTION FAILURE
2024-07-30T07:38:43.4281457Z INFO: ------------------------------------------------------------------------
2024-07-30T07:38:43.4281731Z INFO: Total time: 0.365s
2024-07-30T07:38:43.4285082Z ##[error]ERROR: SonarQube server [https://sonarqube.xxxxxxxxxx] can not be reached
2024-07-30T07:38:43.4285704Z ##[debug]Processed: ##vso[task.logissue type=error;]ERROR: SonarQube server [https://sonarqube.xxxxxxxxxx] can not be reached
2024-07-30T07:38:43.4286136Z ERROR: SonarQube server [https://sonarqube.xxxxxxxxxx] can not be reached
2024-07-30T07:38:43.4381562Z INFO: Final Memory: 5M/40M
2024-07-30T07:38:43.4382099Z INFO: ------------------------------------------------------------------------
2024-07-30T07:38:43.4384542Z ##[error]ERROR: Error during SonarScanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
2024-07-30T07:38:43.4385505Z ##[debug]Processed: ##vso[task.logissue type=error;]ERROR: Error during SonarScanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
2024-07-30T07:38:43.4386368Z ERROR: Error during SonarScanner execution
2024-07-30T07:38:43.4386559Z org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
2024-07-30T07:38:43.4386831Z 	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
2024-07-30T07:38:43.4387073Z 	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
2024-07-30T07:38:43.4387318Z 	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
2024-07-30T07:38:43.4388722Z ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
	at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
	at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
	at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
2024-07-30T07:38:43.4389731Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
	at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
	at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
	at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
2024-07-30T07:38:43.4390386Z 	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
2024-07-30T07:38:43.4390598Z 	at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
2024-07-30T07:38:43.4390791Z 	at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
2024-07-30T07:38:43.4390965Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
2024-07-30T07:38:43.4391188Z 	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
2024-07-30T07:38:43.4391348Z Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
2024-07-30T07:38:43.4391543Z 	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
2024-07-30T07:38:43.4391762Z 	at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
2024-07-30T07:38:43.4392485Z ##[error]at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
	... 7 more
2024-07-30T07:38:43.4392935Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
	... 7 more
2024-07-30T07:38:43.4393281Z 	at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
2024-07-30T07:38:43.4393508Z 	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
2024-07-30T07:38:43.4393677Z 	... 7 more
2024-07-30T07:38:43.4394174Z ##[error]Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Unknown Source)
2024-07-30T07:38:43.4394659Z ##[debug]Processed: ##vso[task.logissue type=error;]Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Unknown Source)
2024-07-30T07:38:43.4395026Z Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-30T07:38:43.4395244Z 	at java.base/sun.security.ssl.Alert.createSSLException(Unknown Source)
2024-07-30T07:38:43.4395965Z ##[error]at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
	at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
	at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(Unknown Source)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(Unknown Source)
2024-07-30T07:38:43.4396545Z ##[debug]Processed: ##vso[task.logissue type=error;]at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
	at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
	at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(Unknown Source)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(Unknown Source)
2024-07-30T07:38:43.4396923Z 	at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
2024-07-30T07:38:43.4397073Z 	at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
2024-07-30T07:38:43.4397221Z 	at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
2024-07-30T07:38:43.4397394Z 	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(Unknown Source)
2024-07-30T07:38:43.4397576Z 	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(Unknown Source)
2024-07-30T07:38:43.4398170Z ##[error]at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(Unknown Source)
	at java.base/sun.security.ssl.SSLHandshake.consume(Unknown Source)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(Unknown Source)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(Unknown Source)
2024-07-30T07:38:43.4398681Z ##[debug]Processed: ##vso[task.logissue type=error;]at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(Unknown Source)
	at java.base/sun.security.ssl.SSLHandshake.consume(Unknown Source)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(Unknown Source)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(Unknown Source)
2024-07-30T07:38:43.4399030Z 	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(Unknown Source)
2024-07-30T07:38:43.4399187Z 	at java.base/sun.security.ssl.SSLHandshake.consume(Unknown Source)
2024-07-30T07:38:43.4399337Z 	at java.base/sun.security.ssl.HandshakeContext.dispatch(Unknown Source)
2024-07-30T07:38:43.4399491Z 	at java.base/sun.security.ssl.HandshakeContext.dispatch(Unknown Source)
2024-07-30T07:38:43.4400177Z ##[error]at java.base/sun.security.ssl.TransportContext.dispatch(Unknown Source)
	at java.base/sun.security.ssl.SSLTransport.decode(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
2024-07-30T07:38:43.4400778Z ##[debug]Processed: ##vso[task.logissue type=error;]at java.base/sun.security.ssl.TransportContext.dispatch(Unknown Source)
	at java.base/sun.security.ssl.SSLTransport.decode(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
2024-07-30T07:38:43.4401214Z 	at java.base/sun.security.ssl.TransportContext.dispatch(Unknown Source)
2024-07-30T07:38:43.4401357Z 	at java.base/sun.security.ssl.SSLTransport.decode(Unknown Source)
2024-07-30T07:38:43.4401507Z 	at java.base/sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
2024-07-30T07:38:43.4401663Z 	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
2024-07-30T07:38:43.4401822Z 	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
2024-07-30T07:38:43.4401971Z 	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
2024-07-30T07:38:43.4402904Z ##[error]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectTls(RealConnection.java:336)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect(RealConnection.java:185)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
2024-07-30T07:38:43.4403732Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectTls(RealConnection.java:336)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect(RealConnection.java:185)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
2024-07-30T07:38:43.4404287Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectTls(RealConnection.java:336)
2024-07-30T07:38:43.4404539Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
2024-07-30T07:38:43.4404788Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect(RealConnection.java:185)
2024-07-30T07:38:43.4405081Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
2024-07-30T07:38:43.4405731Z ##[error]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
2024-07-30T07:38:43.4406236Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
2024-07-30T07:38:43.4406636Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
2024-07-30T07:38:43.4406886Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
2024-07-30T07:38:43.4407528Z ##[error]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.Transmitter.newExchange(Transmitter.java:169)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
2024-07-30T07:38:43.4408033Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.Transmitter.newExchange(Transmitter.java:169)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
2024-07-30T07:38:43.4408456Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.Transmitter.newExchange(Transmitter.java:169)
2024-07-30T07:38:43.4408705Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
2024-07-30T07:38:43.4409357Z ##[error]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
2024-07-30T07:38:43.4409867Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
2024-07-30T07:38:43.4410262Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
2024-07-30T07:38:43.4410509Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
2024-07-30T07:38:43.4410992Z ##[error]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
2024-07-30T07:38:43.4411322Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
2024-07-30T07:38:43.4411620Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
2024-07-30T07:38:43.4412109Z ##[error]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
2024-07-30T07:38:43.4412444Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
2024-07-30T07:38:43.4412753Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
2024-07-30T07:38:43.4413533Z ##[error]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
2024-07-30T07:38:43.4414228Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
2024-07-30T07:38:43.4414702Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
2024-07-30T07:38:43.4414943Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
2024-07-30T07:38:43.4415192Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
2024-07-30T07:38:43.4416265Z ##[error]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:81)
2024-07-30T07:38:43.4417243Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:81)
2024-07-30T07:38:43.4417866Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
2024-07-30T07:38:43.4418125Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
2024-07-30T07:38:43.4418373Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
2024-07-30T07:38:43.4418614Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
2024-07-30T07:38:43.4418833Z 	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:81)
2024-07-30T07:38:43.4419514Z ##[error]at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:115)
	at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
	... 10 more
2024-07-30T07:38:43.4420084Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:115)
	at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
	... 10 more
2024-07-30T07:38:43.4420515Z 	at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:115)
2024-07-30T07:38:43.4420722Z 	at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
2024-07-30T07:38:43.4420940Z 	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
2024-07-30T07:38:43.4421092Z 	... 10 more
2024-07-30T07:38:43.4421672Z ##[error]Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.validator.PKIXValidator.doBuild(Unknown Source)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
2024-07-30T07:38:43.4422185Z ##[debug]Processed: ##vso[task.logissue type=error;]Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.validator.PKIXValidator.doBuild(Unknown Source)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
2024-07-30T07:38:43.4422595Z Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-30T07:38:43.4422846Z 	at java.base/sun.security.validator.PKIXValidator.doBuild(Unknown Source)
2024-07-30T07:38:43.4423001Z 	at java.base/sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
2024-07-30T07:38:43.4423535Z ##[error]at java.base/sun.security.validator.Validator.validate(Unknown Source)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
	... 45 more
2024-07-30T07:38:43.4423952Z ##[debug]Processed: ##vso[task.logissue type=error;]at java.base/sun.security.validator.Validator.validate(Unknown Source)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
	... 45 more
2024-07-30T07:38:43.4424253Z 	at java.base/sun.security.validator.Validator.validate(Unknown Source)
2024-07-30T07:38:43.4424407Z 	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
2024-07-30T07:38:43.4424573Z 	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
2024-07-30T07:38:43.4424703Z 	... 45 more
2024-07-30T07:38:43.4425088Z ##[error]Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-30T07:38:43.4425384Z ##[debug]Processed: ##vso[task.logissue type=error;]Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-30T07:38:43.4425650Z Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-30T07:38:43.4426123Z ##[error]at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
2024-07-30T07:38:43.4426461Z ##[debug]Processed: ##vso[task.logissue type=error;]at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
2024-07-30T07:38:43.4426738Z 	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
2024-07-30T07:38:43.4426901Z 	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
2024-07-30T07:38:43.4427277Z ##[error]at java.base/java.security.cert.CertPathBuilder.build(Unknown Source)
	... 50 more
ERROR:
2024-07-30T07:38:43.4427589Z ##[debug]Processed: ##vso[task.logissue type=error;]at java.base/java.security.cert.CertPathBuilder.build(Unknown Source)
	... 50 more
ERROR:
2024-07-30T07:38:43.4427806Z 	at java.base/java.security.cert.CertPathBuilder.build(Unknown Source)
2024-07-30T07:38:43.4427927Z 	... 50 more
2024-07-30T07:38:43.4428007Z ERROR: 
2024-07-30T07:38:43.4595350Z ##[error]The SonarScanner did not complete successfully
2024-07-30T07:38:43.4595817Z ##[debug]Processed: ##vso[task.logissue type=error;]The SonarScanner did not complete successfully
2024-07-30T07:38:43.4596098Z The SonarScanner did not complete successfully
2024-07-30T07:38:43.4596520Z ##[error]07:38:43.459  Post-processing failed. Exit code: 1
2024-07-30T07:38:43.4596813Z ##[debug]Processed: ##vso[task.logissue type=error;]07:38:43.459  Post-processing failed. Exit code: 1
2024-07-30T07:38:43.4597294Z 07:38:43.459  Post-processing failed. Exit code: 1
2024-07-30T07:38:43.4646715Z ##[debug]Exit code 1 received from tool '/usr/bin/dotnet'
2024-07-30T07:38:43.4650368Z ##[debug]STDIO streams have closed for tool '/usr/bin/dotnet'
2024-07-30T07:38:43.4653774Z ##[warning]Can't find loc string for key: LIB_ProcessExitCode
2024-07-30T07:38:43.4654084Z ##[debug]Processed: ##vso[task.issue type=warning;]Can't find loc string for key: LIB_ProcessExitCode
2024-07-30T07:38:43.4660909Z ##[warning]Error while executing SonarQube:Analyze task: LIB_ProcessExitCode /usr/bin/dotnet 1
2024-07-30T07:38:43.4661448Z ##[debug]Processed: ##vso[task.issue type=warning;]Error while executing SonarQube:Analyze task: LIB_ProcessExitCode /usr/bin/dotnet 1
2024-07-30T07:38:43.4661746Z ##[debug]task result: Failed
2024-07-30T07:38:43.4662076Z ##[error]LIB_ProcessExitCode /usr/bin/dotnet 1
2024-07-30T07:38:43.4662298Z ##[debug]Processed: ##vso[task.issue type=error;]LIB_ProcessExitCode /usr/bin/dotnet 1
2024-07-30T07:38:43.4663114Z ##[debug]Processed: ##vso[task.complete result=Failed;]LIB_ProcessExitCode /usr/bin/dotnet 1
2024-07-30T07:38:43.4708701Z ##[section]Finishing: Run Code Quality Analysis

sonarqube.log

@tiwarishrijan
Copy link
Author

If it helps @gregory-paidis-sonarsource our team did some analysis and found that in version 7.0 The scanner no longer depends on a local Java runtime environment installation. The required Java runtime environment is provisioned and cached by the scanner.

It seems new JRE installation at runtime is not obeying certs installed on our machine.

@gregory-paidis-sonarsource
Copy link
Contributor

gregory-paidis-sonarsource commented Jul 30, 2024

Hey there,

Thanks a lot for this.
You are absolutely right, we are provisioning the JRE to remove the dependency from the user.
You have a couple of options:

  • If you want to get rid of the provisioning and use your local java installation and configuration, you can either:
    • Specify /d:sonar.scanner.javaExePath=<PATH>
    • Specify /d:sonar.scanner.skipJreProvisioning=true

This will be documented very soon, as it is indeed breaking behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants