# SonarQube Server can not be reached When Calling SonarScanner.MSBuild.exe end

**URL:** <https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947>\
**Category:** SonarQube Server / Community Build\
**Tags:** dotnet, scanner\
**Created:** [February 28, 2023, 9:14pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947 "2023-02-28T21:14:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tony-Arcos](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tony-Arcos](https://community.sonarsource.com/u/Tony-Arcos)\
**Post date:** [February 28, 2023, 9:14pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/1 "2023-02-28T21:14:30Z")

</div>

We are receiving this when running SonarScanner.MSBuild.exe end :

```plaintext
INFO: Scanner configuration file: C:\ws2\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\SonarScanner_for_MSBuild_for_RosterApps\sonar-scanner-4.8.0.2856\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: C:\ws2\workspace\RosterApps_SonarQube_dev\.sonarqube\out\sonar-project.properties
INFO: SonarScanner 4.8.0.2856
INFO: Java 1.8.0_333 Oracle Corporation (64-bit)
INFO: Windows Server 2016 10.0 amd64
INFO: User cache: C:\Users\sa_jenkins\.sonar\cache
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.922s
ERROR: SonarQube server [https://sonarqube.arcos-inc.com] can not be reached
INFO: Final Memory: 11M/970M
INFO: ------------------------------------------------------------------------
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.security.AccessController.doPrivileged(Native Method)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
	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)
	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
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.ssl.Alert.createSSLException(Unknown Source)
	at sun.security.ssl.TransportContext.fatal(Unknown Source)
	at sun.security.ssl.TransportContext.fatal(Unknown Source)
	at sun.security.ssl.TransportContext.fatal(Unknown Source)
	at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(Unknown Source)
	at sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(Unknown Source)
	at sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(Unknown Source)
	at sun.security.ssl.SSLHandshake.consume(Unknown Source)
	at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)
	at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)
	at sun.security.ssl.TransportContext.dispatch(Unknown Source)
	at sun.security.ssl.SSLTransport.decode(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
	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)
	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)
	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)
	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.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
	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.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
	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.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)
	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
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 sun.security.validator.PKIXValidator.doBuild(Unknown Source)
	at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
	at sun.security.validator.Validator.validate(Unknown Source)
	at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
	... 45 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
	at java.security.cert.CertPathBuilder.build(Unknown Source)
	... 51 more
ERROR: 
The SonarScanner did not complete successfully
12:29:21.952 Post-processing failed. Exit code: 1

```

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [March 1, 2023, 3:48pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/3 "2023-03-01T15:48:02Z")

</div>

Hi,

Welcome to the community!

> [@Tony-Arcos](#):
>
> ```auto
> ERROR: SonarQube server [https://sonarqube.arcos-inc.com] can not be reached
> 
> ```

Analysis isn’t able to talk to your SonarQube server. Since it looks like you’re using Jenkins, you should check the global SonarQube server configuration to make sure it’s got the right address.

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![Tony-Arcos](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tony-Arcos](https://community.sonarsource.com/u/Tony-Arcos)\
**Post date:** [March 1, 2023, 6:38pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/4 "2023-03-01T18:38:31Z")

</div>

Thank you, as I did need to update from [http://sonarqube.arcos-inc.com](http://sonarqube.arcos-inc.com) to [https://sonarqube.arcos-inc.com](https://sonarqube.arcos-inc.com). However, now we are receiving this error:

```auto
rg.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.security.AccessController.doPrivileged(Native Method)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
	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)
	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
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.ssl.Alert.createSSLException(Unknown Source)
	at sun.security.ssl.TransportContext.fatal(Unknown Source)
	at sun.security.ssl.TransportContext.fatal(Unknown Source)
	at sun.security.ssl.TransportContext.fatal(Unknown Source)
	at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(Unknown Source)
	at sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(Unknown Source)
	at sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(Unknown Source)
	at sun.security.ssl.SSLHandshake.consume(Unknown Source)
	at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)
	at sun.security.ssl.HandshakeContext.dispatch(Unknown Source)
	at sun.security.ssl.TransportContext.dispatch(Unknown Source)
	at sun.security.ssl.SSLTransport.decode(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
	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)
	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)
	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)
	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.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
	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.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
	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.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)
	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
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 sun.security.validator.PKIXValidator.doBuild(Unknown Source)
	at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
	at sun.security.validator.Validator.validate(Unknown Source)
	at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
	... 45 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
	at java.security.cert.CertPathBuilder.build(Unknown Source)
	... 51 more

```

---

<div class="post-metadata">

**Author:** ![Tony-Arcos](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tony-Arcos](https://community.sonarsource.com/u/Tony-Arcos)\
**Post date:** [March 1, 2023, 6:39pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/5 "2023-03-01T18:39:21Z")

</div>

The certificate is valid and I can reach [https://sonarqube.arcos-inc.com](https://sonarqube.arcos-inc.com) via a web browser from the build server.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [March 1, 2023, 6:59pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/6 "2023-03-01T18:59:42Z")

</div>

Hi,

> [@Tony-Arcos](#):
>
> `PKIX path building failed`

Looks like you need to add the certificate to the keystone on the build agent.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![Tony-Arcos](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tony-Arcos](https://community.sonarsource.com/u/Tony-Arcos)\
**Post date:** [March 1, 2023, 9:05pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/7 "2023-03-01T21:05:28Z")

</div>

Hi Ann,

By build agent do you mean the build server, Jenkins server or something else? We are really struggling with this issue and setup?

Thanks,

Tony

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [March 2, 2023, 12:59pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/8 "2023-03-02T12:59:36Z")

</div>

Hi Tony,

I mean wherever analysis is being performed. I guess the build server.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![Tony-Arcos](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tony-Arcos](https://community.sonarsource.com/u/Tony-Arcos)\
**Post date:** [March 2, 2023, 2:06pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/9 "2023-03-02T14:06:02Z")

</div>

Hi Ann,

I am really having a hard time with this should be an issue. From the Build server, I can access our SonarQube site from a browser:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/c/5/c5eb4d4b3c075618de4980996b435188229ae3d6.png)

What am I missing?

Thanks,

Tony

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [March 2, 2023, 6:23pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/10 "2023-03-02T18:23:54Z")

</div>

Hi Tony,

> [@Tony-Arcos](#):
>
> PKIX path building failed

This is a certificate error. I’m not an expert in this area. I can only tell you that it looks like you need to get the cert trusted by _Java_ on the build agent. Not the browser. Java.

Are you using GitLab? This seems particularly prevalent with it and there are a number of threads here in the Community that might help.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![Tony-Arcos](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tony-Arcos](https://community.sonarsource.com/u/Tony-Arcos)\
**Post date:** [March 2, 2023, 6:43pm UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/11 "2023-03-02T18:43:44Z")

</div>

BitBucket - I will see what I can find - thanks.

---

<div class="post-metadata">

**Author:** ![lunga\_lungile](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lunga_lungile/32/59803_2.png) [@lunga\_lungile](https://community.sonarsource.com/u/lunga_lungile)\
**Post date:** [July 19, 2024, 9:39am UTC](https://community.sonarsource.com/t/sonarqube-server-can-not-be-reached-when-calling-sonarscanner-msbuild-exe-end/84947/12 "2024-07-19T09:39:14Z")

</div>

Getting the same error and im running it using bitbucket pipeline, it was working when it was HTTP now that i moved it to the Production environment i had to secure the url using a reverse proxy, my url is exposed to the internet but its bitbucket .org cant reach it. And the error is exactly the same.  
Fail to get bootstrap index, and the javax.net.ssl.SSLHandshakeException,  
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException  
unable to find valid certification path to requested target
